-
Notifications
You must be signed in to change notification settings - Fork 779
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
Switch to workspace deps - batch 1 #4391
Conversation
cc @ggwpez |
# Conflicts: # substrate/frame/executive/Cargo.toml
# Conflicts: # Cargo.toml
11faf04
to
f4d9955
Compare
# Conflicts: # Cargo.toml # substrate/test-utils/cli/Cargo.toml
# Conflicts: # Cargo.toml # substrate/client/network/common/Cargo.toml # substrate/frame/contracts/Cargo.toml # substrate/frame/contracts/uapi/Cargo.toml # substrate/frame/support/Cargo.toml # substrate/primitives/core/Cargo.toml
# Conflicts: # Cargo.toml # cumulus/client/relay-chain-rpc-interface/Cargo.toml # cumulus/test/service/Cargo.toml # substrate/client/merkle-mountain-range/rpc/Cargo.toml # substrate/client/sync-state-rpc/Cargo.toml # substrate/frame/transaction-payment/rpc/Cargo.toml # substrate/utils/frame/remote-externalities/Cargo.toml # substrate/utils/frame/rpc/support/Cargo.toml # substrate/utils/frame/rpc/system/Cargo.toml
# Conflicts: # polkadot/node/zombienet-backchannel/Cargo.toml
0b6e23c
to
67d407b
Compare
Is it reproducible with some command? |
Sorry, no, I don't write a script to do this. My way is:
I use JetBrains IDE, it has some useful tools can help me. I may miss some crates, but those moved should be OK. The CI also helps to check feature gates. |
I was thinking of writing a tool, but parsing TOML and doing in-place replacement is difficult, so I gave up. |
These things should be automated to avoid human error. I did both of these MRs as preparation to see if the tool reliably works, and it seems to: #2070 & #3366 IIUC what you did manually is: It would be good to have a way to reproduce that is reviewable, otherwise i dont want to check the diff every time that we pull up some dependencies. When there is an automated way, then only the automated way needs to be reviewed and not the whole diff. |
Now imagine we want to do the same thing for all other dependencies, then for the runtimes repo and for all other repos in the Polkadot Ecosystem. |
But I believe you need to do cross-checking even you have a tool? Besides, if the tool is reliable, why don't you just flush all crates? why need to review? CI can ensure the correctness |
I believe this is a one-time job, once we move to workspace dependencies, contributors should follow the rule. |
The only diff with your tool is I prefer explicit declare |
TBH, this is a boring job, I volunteer to do it, unfortunately, reviewers have to bear the boring, too. I don't get the point of why it needs to be automatic. But you, the reviewer, have to use another way to cross-check my work, If there's a reliable tool and we use it, the reviewers reproduce my work on their side still make no sense to me. For I tried it, the result is |
I think a manual skim of all changes (to ensure nothing unexpected) + the CI passing means it's fine, our CI is quite thorough. Personally I'd rather review one large PR with all the workspace changes and get it over with, instead of reviewing multiple of the exact same type of PR throughout the week. but I'll defer to @ggwpez if he has another pref. |
Dunno, i already gave my opinion 😆. cc @bkchr |
Yeah let's rip off the band-aid once ;) If the script @liamaharon mentions works, let's use it. |
Yes true. I like to test things one-by-one, so first doing 10 dependencies - seeing if something downstream breaks - then the next batch. Anyway, the dependency inheritor seems to produce incorrect workspace config:
You can use Zepter to at least pull all external deps. It produces valid config, does not double-add Both approaches update some deps in the process (you can check first with |
Explicit |
We can discuss the coding style, and I will follow your suggestions. PS: I duplicated My point is that when reviewing it, we need to cross-check. That said, reviewers should use another method to ensure its correctness. So, you'll be able to use tools to check my hand-made work quickly. |
Should be done now by #4716 |
Split to separated commits, please focus on
default-features