Ensure that dependencies in Cargo.toml are sorted
Opened this issue · 1 comments
Indy2222 commented
Add another job to GH Actions which ensures alphabetical sorting of dependencies. Conditioner using this tool for the job https://github.com/DevinR528/cargo-sort
JackCrumpLeys commented
Sadly the way we centralize dependencies takes https://github.com/DevinR528/cargo-sort of the table for now. It will always throw an error something like this:
error: TOML parse error at line 6, column 8
|
6 | version.workspace = true
| ^
Unexpected `.`
Expected `=`
They have an open issue around this in their repo DevinR528/cargo-sort#47 and aims to be solved by DevinR528/cargo-sort#29. Sadly the repository seems stale and the only way to solve this might be to fork it ourselves.
One solution mentioned in the issue is to change the format slightly to support the old parser:
version = { workspace = true } # Fine
version.workspace = true # Error!
I do not like that format and I think we should find a better solution.