-
Notifications
You must be signed in to change notification settings - Fork 246
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
Unify the styling of dependencies in Cargo.toml #47
Conversation
And some other styling nits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comments:
- No need to split dependencies into multiple sections and prefix with
# Subspace
, one list sorted alphabetically is fine [dependencies.X]
is actually preferred for non-trivial dependencies in crates that are not inherently related to Substrate- One reason Substrate-related crates are different is because we inherited code style from there
- Second and more important reason is that the number of dependencies in those is insane and expanded form will not be much more readable either, probably even worse
- I usually use compact form for simple dependencies and expanded for those that need thigns customized, because sometimes we need to do not pretty things like https://github.com/subspace/subspace/blob/5ec95d5120ae07234952270984cf4407157a0c41/crates/subspace-archiving/Cargo.toml#L25-L44
- Please don't change crate authors (code is licensed by the company, but authored by individuals)
The benefit for multiple sections is that we can separate out the client-only and runtime-related crates clearly, runtime means it should compile under I agree that |
I don't see much benefit in that, it is pretty clear that if you have something under What do you think about using https://github.com/dprint/dprint in CI and automate the process of maintaining the formatting of |
Well, for me, the multiple sections(e.g., I don't have a strong opinion on dprint as toml seemingly does not have an official formatter like |
Yes, let's use a single section for now and this should be good to go.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node dependencies still have multiple sections, looks good otherwise
Thank you! |
Basically, my personal taste for the dependencies styling, the main idea is : non-substrate deps,
sc-*
,sp-*
,frame-*
/pallet-*
, subspace deps. Feel free to suggest another one, but a unified style is always good for collaboration.Putting the dep items in batches also brings more convenience for the batch editing operation in a text editor.
No code changes, only styling stuff. I believe it works if it compiles.
Related #44.