-
Notifications
You must be signed in to change notification settings - Fork 781
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
Use docify export for parachain template hardcoded configuration and embed it in its README #6333 #7093
Conversation
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.
I haven't run this yet, but I think it needs a few tweaks before it runs successfully. LMK if anything is not clear.
All GitHub workflows were cancelled due to failure one of the required jobs. |
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.
Hah, almost there! Very nice!
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.
Hmm, not sure why the prdoc check fails this time, maybe the suggestion can fix it.
Co-authored-by: Iulian Barbu <[email protected]>
// The parachain-template crate helps with keeping the README.md in sync | ||
// with code sections across the components under the template: node, | ||
// pallets & runtime, by using `docify`. |
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.
nit, maybe:
// The parachain-template crate helps with keeping the README.md in sync | |
// with code sections across the components under the template: node, | |
// pallets & runtime, by using `docify`. | |
+ //! The parachain-template crate exists solely to keep the README.md file up-to-date using docify. | |
//! It ensures synchronization between the README and code sections across the template components, | |
//! such as the node, pallets, and runtime. Note that this crate itself is not copied into the | |
//! template repository. |
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.
@seemantaggarwal I believe it is a valuable improvement: clear doc why this crate was created is always appreciated. Please re-consider including this.
Use docify export for parachain template hardcoded configuration and embed it in its README #6333
Docify currently has a limitation of not being able to embed a variable/const in its code, without embedding it's definition, even if do something in a string like
"this is a sample string ${sample_variable}"
It will embed the entire string
"this is a sample string ${sample_variable}"
without replacing the value of sample_variable from the code
Hence, the goal was just to make it obvious in the README where the PARACHAIN_ID value is coming from, so a note has been added at the start for the same, so whenever somebody is running these commands, they will be aware about the value and replace accordingly.
To make it simpler, we added a
rust ignore block so the user can just look it up in the readme itself and does not have to scan through the runtime directory for the value.