-
Notifications
You must be signed in to change notification settings - Fork 740
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
pallet_section not work for storage #5320
Comments
just wanted to bring some attention to this @gupnik / @kianenigma looks like storages don't work with |
Thanks for the report! @gupnik is OOO for the next 2 weeks, but I am sure he will attend to this when he's back. |
looks like the |
fixes #5320 @sam0x17 @gupnik # Description The issue could be confirmed with the added example. The cause is for macro hygiene, `entries` in the `#( #entries_builder )*` expansion won't be able to reference the `entries` defined outside. The solution here is to allow the reference to be passed into the expansion with closure. Or we could just switch to the unhygienic span with `quote::quote!` instead such that `entries` will resolve to the "outer" definition.
fixes #5320 @sam0x17 @gupnik # Description The issue could be confirmed with the added example. The cause is for macro hygiene, `entries` in the `#( #entries_builder )*` expansion won't be able to reference the `entries` defined outside. The solution here is to allow the reference to be passed into the expansion with closure. Or we could just switch to the unhygienic span with `quote::quote!` instead such that `entries` will resolve to the "outer" definition.
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
For the pallet which include many storage, we try to use the pallet_section to put some storage in separate file. but we get the compilation error as "error[E0425]: cannot find value
entries
in this scope".Steps to reproduce
source code: https://github.com/opentensor/subtensor/tree/junius-try-storage-macro/pallets/subtensor
steps:
The text was updated successfully, but these errors were encountered: