Use the umbrella crate for the parachain template#5991
Use the umbrella crate for the parachain template#5991serban300 merged 14 commits intoparitytech:masterfrom serban300:parachain-template-umbrella
Conversation
kianenigma
left a comment
There was a problem hiding this comment.
You can decide to do this in a separate PR, but part of the issue requirement is also to move the runtime+pallet to polkadot-sdk-frame umbrella crate.
You can see the minimal template for how this works.
You might need to add more items to the preludes in polkadot-sdk-frame for this. See #4782
@kianenigma I migrated also the runtime + pallet, but I had to keep a few of the old crates because of some limitations. I will create a follow-up issue for this. This PR is ready for review. PTAL ! |
But you have not migrated them to In fact, I see now that even in the original PR for the minimal template, we have not fully moved the runtime to the In short, I think for our templates, we should build the pallet+runtime ONLY with Pinging a few heads to agree with this: @ggwpez @franciscoaguirre @muharem @shawntabrizi and if agreed, I suggest not further deferring this goal. I am fixing a lot of the little shortcomings in |
Oh sorry, I didn't know that. I thought I had to use But what's the difference ? Isn't it another way of referring to the same crates in the end ? |
Similar, but the Please see this commit d253bc5 and the docs for |
|
We can still merge this PR as is, happy to take a step back and not be a blocker as it is a clear improvement :) But my overall intention here is to standardize: with this PR and #5995:
As for the decision tree above, I am personally in favor of using it just as I would like to make a decision about the "umbrella crate strategy", and present it in Sub0, so please chime in, and be contrarion if you want to :) |
I think there is not much difference, as long as people are using the frame crate at all (no matter where they import it from). |
|
Implemented the suggestions. For the pallet I used only the |
templates/parachain/node/Cargo.toml
Outdated
| docify = { workspace = true } | ||
| color-print = { workspace = true } | ||
|
|
||
| polkadot-sdk = { workspace = true, features = ["experimental", "node"] } |
There was a problem hiding this comment.
Why are we enabling a experimental feature in our templates? There is something fishy again..
There was a problem hiding this comment.
I would soon remove this flag from the frame umbrella crate, rest assured.
There was a problem hiding this comment.
Looks like it wasn't needed. Removed it.
substrate/frame/support/src/lib.rs
Outdated
| pub use sp_inherents::MakeFatalError; | ||
| pub use sp_runtime::{ | ||
| traits::{MaybeSerializeDeserialize, Member, ValidateUnsigned}, | ||
| traits::{CheckedAdd, MaybeSerializeDeserialize, Member, One, ValidateUnsigned}, |
There was a problem hiding this comment.
What about all the other Checked* traits and Zero?
Use the umbrella crate for the parachain template
This covers almost all the dependencies. There are just a few exceptions for which I created a separate issue: #5993
Also related to: #4782