- Upgrade the Docker base image to Debian Trixie (docker builds were broken)
- Support several manifests with --workspace
- Respect --grouped inside target-specific dependency tables
Bug Fixes
- Fix a regression from 2.1.1 where comments after array values would be removed (#134)
Bug Fixes
- Fix a regression for checking files with CRLF file endings (#131)
Bug Fixes
- Don't error out on formatting-only diff unless
--check-formatis passed (#129)
Bug Fixes
- Formatting of arrays in inline tables is more conservative now
- In particular, such arrays are no longer converted to a single line,
- and comments inside of them are now preserved
Bug Fixes
- Fix workspace discovery & sorting when directory name has an extension (#121)
- Apply formatting to arrays inside inline tables as well (#122)
Additions
- Add support for sorting feature lists (behind the new config option
sort_feature_list) (#122) --configflag for specifying a custom config file (#124)
Other Improvements
- Upgrade the toml crate to 0.25, bringing support for TOML 1.1 (#126)
Bug fixes
- Set the Ubuntu release builder to ubuntu-22.04 to ensure that pre-built cargo-sort binaries can run on ubuntu-22.04 GitHub Actions runners and not get an error message about
GLIBC_2.38not found.
Bug fixes
- Fix unintended merging of dependency groups with
--groupedwhen dotted key syntax was used
This release is a big one! Special thanks go out to @thomaseizinger who fixed a lot of regressions
from the initial toml_edit upgrade.
Thanks also to @ssrlive for contributing a bunch of improvements.
Highlights
- Upgrade
toml_editto support more TOML syntax (in particular,something.workspace = true) - Format
Cargo.tomlfiles by default- Use
-nor--no-formatto disable this --checkmode also verifies formatting unless you pass the abovementioned flag
- Use
workspace.dependencies(andbuild-/dev-dependencies) are now also sortedtarget.'cfg(something)'.dependenciesnow go right afterdependencies- The same goes for target-specific
dev-dependencies
- The same goes for target-specific
Other Improvements
- Remove unused dependencies
- In non-check mode, report whether files were already sorted or not
Yanked, because it did invalid changes in many situations.
Bug Fixes
- The
--workspacefeature now respects the exclude array
Update
- Update clap from 2.34 to 4.0.10
Feature
- Add --check-format flag
- If set,
cargo-sortwill check formatting (allows only checking formatting) - Thanks matze
- If set,
- DockerHub builds added
Bug Fixes
- Fix leaving files in the list of paths to check when
--workspaceis used with globs - Fix the cargo install always re-installing rust-lang/cargo#8703
Bug Fixes
- Fix handling of windows style line endings
Feature
- Add colorized help output
Bug Fixes
- Fix trailing comma in multi-line arrays
- Simplify output of running cargo-sort
- Add
--orderflag to specify ordering of top-level tables
Overhaul
- Remove toml-parse crate in favor of toml_edit
- Changed name from cargo-sort-ck to cargo-sort