-
Notifications
You must be signed in to change notification settings - Fork 144
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
feature idea: alphabetical order crates and sorted insert #280
Comments
Hey @Dowwie! Are you not interested in this feature anymore? The only tricky question is what to do with the comments during reordering. Currently, the underlying toml library assumes that comment above and on the right of a key-value pair "belong" to it. e.g. when reordering this toml # comment 2
dep2 = "version2" # comment 3
# comment 1
dep1 = "version1" it would look like # comment 1
dep1 = "version1"
# comment 2
dep2 = "version2" # comment 3 If this is what you would expect, then it can be fairly easily implemented. I don't have time to implement it, but would be happy to mentor. |
@ordian the comment ownership as you described seems reasonable to me. Would you accept a PR with reordered items as you illustrated? |
@Dowwie yes please! Feel free to ask any questions in https://gitter.im/cargo-edit/Lobby. |
What would a good format for the feature be? I'm thinking
What do you think? |
@thiagoarrais how about also sort on insert, such as "cargo add --sorted" ? |
that is done pending merge: #322 |
Come to think of it, maybe |
What do you think of the idea of a feature to alphabetically order crate dependencies and another to enhance "cargo add " with an ordered insert?
The text was updated successfully, but these errors were encountered: