-
Notifications
You must be signed in to change notification settings - Fork 2.6k
doc-only module to group all storage items of a pallet #12398
Comments
cc @sam0x17 |
This would be a good add-on or follow-up to #12334 |
We should not only list all the public storage types. We should probably support having all of them shown in the docs, not just the public ones. |
Yeah, let's do that. Might be a little confusing though because some of them might not be public in the Rust code. This |
I think they are rather unrelated in terms of what needs to be done for it, but yeah perhaps a follow-up for you once you are finished there, feel free to assign to yourself :) |
@olliecorbisiero this is the fix for what we spoke of today. |
This is currently blocked by the fact that some storage types can be made Option 1: All storage items must be public and visible in the rust-docs. I would go with either option 1 or 3 for now. |
Option 4:
Sounds reasonable, as you only see the storage items that you can access.
We could add some warning when you use something that isn't |
@ggwpez @KiChjang @shawntabrizi if you are more or less on the same page, let's consider option 1. |
Well, in that case, why don't we just remove the ability to set visibility on storages? Sounds like we can just modify the macro to do so. |
We could, but a warning is probably better from the usability. |
Bear in mind custom warnings aren't stabilized in rust yet (unless this happened very recently without me knowing) so this is often harder than it sounds |
Yeah I know, but yeah, we could also make it a compile_error. However, we should ensure that we generate the correct code plus the compile error. Otherwise people would get tons of unrelated compile errors. |
@kianenigma Yeah I'll pick that up. It's well timed because I'm wrapping up #13224 today |
A simple one: create a
for nicer discoverability in rustdocs.
Essentially, similar to this page, but better:
https://polkadot.js.org/docs/substrate/storage/#staking
The text was updated successfully, but these errors were encountered: