-
Notifications
You must be signed in to change notification settings - Fork 834
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
Revive Substrate Crate #1477
Revive Substrate Crate #1477
Conversation
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
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.
IMO we should move the crate into its own folder. It shouldn't at the top of the substrate folder.
Where else should it go? This crate is documenting the whole Substrate Framework. |
Then cargo check in the substrate dir would just check substrate code. It's good to have options as to how much code you want to compile. (E.g. you might want to get something working happily with the substrate codebase before then dealing with the impacts to the cumulus and polkadot dirs.) Compiling the kitchen sink would get you this but that's not as intuitive. |
Good idea 👍 |
This option is the |
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.
truthfully I prefer root of the folder to 'doc' as it is more aligned with our naming conventions. Otherwise we'd have to make a crate in 'substrate/doc' named 'substrate', which is a new convention now.
Either way good though
I would have thought we create a top level folder |
Co-authored-by: Bastian Köcher <git@kchr.de>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
You mean since otherwise it would be inconsistent with the root level? I guess it would looks like this:
Yea it would be slightly inconsistent, but that it only since the root level should not have a |
I mean in general, if we have doc only crates. Which is fine. Why should the not exist in |
My idea is to have one top-level crate, which links to the doc-only crates for
Would that cause any other issues? The user journey I've had in my looks something like this:
|
Wasn't aware that we already have |
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Cargo.toml
Outdated
@@ -96,6 +96,7 @@ members = [ | |||
"cumulus/test/runtime", | |||
"cumulus/test/service", | |||
"cumulus/xcm/xcm-emulator", | |||
"docs/substrate", |
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.
@wentelteefje can you make sure that this crate is opened when you open substrate in https://paritytech.github.io/polkadot-sdk/? I think it was some line that has to be changed in the CI configs.
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.
yes
@@ -0,0 +1,28 @@ | |||
[package] |
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.
should be removed.
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 am mildly against the folder structure here and want to bikeshed in favor of moving this back to ./substrate/src
in its current structure.
I just think it is inconsistent with the previous pattern. Also, when we want to create automatic redirects for dead URLs like https://paritytech.github.io/substrate/master/substrate/index.html
, we would have to make an exception for this.
Also the naming of what goes in ./doc
and what goes in ./docs
is not clear.
But happy to move forward as is.
Now question for @bkchr: if I am to create a new crate that is analogous to the substrate
crate for polkadot-sdk
, polkadot
and cumulus
, all of thse would also be placed under ./docs
?
Yeah, I've said this before but principle of least surprise in a rust workspace, at least for me, would dictate that any directory that has crates in it should itself be a crate containing re-exports of all the child crates (except for private/internal ones). This allows for granular compiling based on the folder structure and I would consider it a best practice. If this is for some reason awkward to follow then this is a smell that something is wonky with our directory structure. The directory hierarchy and our crate/module hierarchy should work together in close unison to organize our code as much as possible. Even when things aren't set up this way, many times people will There are numerous benefits to this setup beyond mere docs accessibility, and in lieu of additional bin targets, this doesn't increase build time at all. |
Yeah, and once we move
Then I would be happy with having a crate that is just all pallets bundled together. It would be a rather stupid crate to use as you rarely need all pallets, but it would be harmless as it won't pollute the |
Also, we want to have a slim version of the master tutorial and reference docs to live in the mono-repo for compatibility and versioning reasons. Where should those live. The more I think about this, the more I lean toward:
|
If there are only exist for doc reasons, there logical place should be in the docs folder 👀 But yeah, do whatever you want to do. I will not block on this. |
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
I moved it back to |
I am sorry to say that my proposal above was not great and I am about to change my mind 🙈 I think we should move everything into a single crate called This gives us the ability to navigate backwards and inwards into different crates, and build a nice hierarchy. For example, you could be in I think I will explore further with this and possibly change the structure. Once this structure is settled we should finalize the future of markdown files as well #1260. |
Closes paritytech#1450 Bringing back the Substrate crate that was forgotten in the monorepo import 😅. It is a doc-only crate. Version number is set to `1.0.0` and publishing is enabled (so that we can link to docs.rs). --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Closes #1450
Bringing back the Substrate crate that was forgotten in the monorepo import 😅.
It is a doc-only crate. Version number is set to
1.0.0
and publishing is enabled (so that we can link to docs.rs).