Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that dependencies in Cargo.toml are sorted #523

Open
Indy2222 opened this issue Jun 18, 2023 · 2 comments
Open

Ensure that dependencies in Cargo.toml are sorted #523

Indy2222 opened this issue Jun 18, 2023 · 2 comments

Comments

@Indy2222
Copy link
Collaborator

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
Copy link
Contributor

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.

Copy link

There is no activity on the issue for some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants