Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a730fe1
impl_runtime_apis: Generate getters for `metadata_at` functions
lexnv Jan 30, 2023
bc1fed4
runtime: Implement new `Metadata` runtime trait
lexnv Jan 30, 2023
46681dd
runtime: Move `metadata_at` functions to construct_runtime macro
lexnv Jan 31, 2023
d03dd7d
contruct_runtime: Use `OpaqueMetadata` from hidden imports
lexnv Jan 31, 2023
441b7ad
Adjust testing
lexnv Jan 31, 2023
555ccfb
frame/tests: Add tests for the new API
lexnv Jan 31, 2023
b43038f
Merge remote-tracking branch 'origin/master' into lexnv/md15_expose_m…
Feb 2, 2023
f484197
Merge remote-tracking branch 'origin/master' into lexnv/md15_expose_m…
Feb 7, 2023
f21f229
frame/tests: Adjust metdata naming
lexnv Feb 14, 2023
a5feff4
frame/support: Expose `metadata-v14` feature flag
lexnv Feb 14, 2023
24e5033
frame/support: Expose metadata only under feature flags
lexnv Feb 14, 2023
caf5c96
frame/support: Expose v14 metadata by default
lexnv Feb 14, 2023
0f88a88
frame/support: Expose metadata feature for testing
lexnv Feb 14, 2023
de27280
frame/support: Test metadata under different feature flags
lexnv Feb 14, 2023
dd09f0c
Update primitives/api/src/lib.rs
lexnv Feb 14, 2023
0596269
Merge remote-tracking branch 'origin/master' into lexnv/md15_expose_m…
Feb 14, 2023
f7c0493
Update primitives/api/src/lib.rs
lexnv Feb 17, 2023
506799c
Merge remote-tracking branch 'origin/master' into lexnv/md15_expose_m…
Feb 17, 2023
19900a5
client/tests: Adjust testing to reflect trait Metadata change
lexnv Feb 17, 2023
a2b1bd7
Merge remote-tracking branch 'origin/master' into lexnv/md15_expose_m…
lexnv Feb 24, 2023
485acef
frame/metadata-ir: Add intermediate representation types for metadata
lexnv Feb 24, 2023
46b52cf
frame/metadata-ir: Convert metadata to V14
lexnv Feb 24, 2023
3c171d9
frame/metadata-ir: Add API to convert metadata to multiple versions
lexnv Feb 24, 2023
d334a09
frame/metadata-ir: Expose V14 under feature flag
lexnv Feb 24, 2023
a68ba6b
frame/support: Adjust to metadata IR
lexnv Feb 24, 2023
0064736
frame/support: More adjustments
lexnv Feb 24, 2023
ed5ce74
frame/support: Guard v14 details under feature flag
lexnv Feb 27, 2023
d96c2f1
frame/support: Adjust testing
lexnv Feb 27, 2023
68e7c5b
CI: Ensure `quick-benchmarks` uses `metadata-v14`
lexnv Feb 27, 2023
ae4144e
frame/support: Use `metadata-v14` for benchmarks
lexnv Feb 27, 2023
1a99c6e
Adjust cargo fmt
lexnv Feb 27, 2023
475c5d8
kitchensink-runtime: Add feature flag for `metadata-v14`
lexnv Feb 27, 2023
d170a7a
frame/support/test: Adjust testing
lexnv Feb 27, 2023
9194e52
frame/support/test: Check crates locally
lexnv Feb 27, 2023
bd9fcdb
Activate metadata-v14 for pallets
lexnv Feb 27, 2023
ede9a86
Merge remote-tracking branch 'origin/master' into lexnv/md15_expose_m…
lexnv Feb 28, 2023
c4b7c5c
Remove metadata-v14 feature flag
lexnv Mar 1, 2023
034241c
frame/metadata_ir: Move `api.rs` to `mod.rs`
lexnv Mar 1, 2023
1225e77
frame/support: Handle latest metadata conversion via IR
lexnv Mar 1, 2023
429a467
frame/tests: Add constant for metadata version 14
lexnv Mar 9, 2023
8234488
Merge remote-tracking branch 'origin/master' into lexnv/md15_expose_m…
Mar 13, 2023
290dff3
Merge remote-tracking branch 'origin/master' into lexnv/md15_expose_m…
lexnv Mar 13, 2023
d99f1f8
frame/support/test: Fix merge conflict
lexnv Mar 13, 2023
81c91ac
Update frame/support/Cargo.toml
lexnv Mar 15, 2023
98fab89
Update frame/support/src/metadata_ir/mod.rs
lexnv Mar 15, 2023
31d3483
Update frame/support/test/Cargo.toml
lexnv Mar 15, 2023
63b3109
Update primitives/api/src/lib.rs
lexnv Mar 15, 2023
db4f553
frame/metadata: Collect pallet documentation for MetadataIR
lexnv Mar 15, 2023
a38ca53
frame/tests: Check pallet documentation is propagated to MetadataIR
lexnv Mar 15, 2023
6208434
frame/support: Improve documentation
lexnv Mar 15, 2023
9065690
Merge remote-tracking branch 'origin/master' into lexnv/md15_expose_m…
lexnv Mar 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
frame/support: Improve documentation
Signed-off-by: Alexandru Vasile <[email protected]>
  • Loading branch information
lexnv committed Mar 15, 2023
commit 6208434fb9e9f4a56c6472e57c521ef67d54a7a7
6 changes: 3 additions & 3 deletions frame/support/procedural/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ pub fn construct_runtime(input: TokenStream) -> TokenStream {
/// #[doc = include_str!("../README.md")]
/// #[pallet_doc("../doc1.md")]
/// #[pallet_doc("../doc2.md")]
/// pub struct Pallet<T>(_);
/// pub mod pallet {}
/// ```
///
/// The runtime metadata for this pallet contains the following
Expand All @@ -514,7 +514,7 @@ pub fn construct_runtime(input: TokenStream) -> TokenStream {
/// /// Documentation for pallet 1
/// /// Documentation for pallet 2
/// /// Content of README.md
/// pub struct Pallet<T>(_);
/// pub mod pallet {}
/// ```
///
/// If you want to specify the file from which the documentation is loaded, you can use the
Expand All @@ -531,7 +531,7 @@ pub fn construct_runtime(input: TokenStream) -> TokenStream {
///
/// This approach is beneficial when you use the `include_str` macro at the beginning of the file
/// and want that documentation to extend to the runtime metadata, without reiterating the
/// documentation on the module itself.
/// documentation on the pallet module itself.
#[proc_macro_attribute]
pub fn pallet(attr: TokenStream, item: TokenStream) -> TokenStream {
pallet::pallet(attr, item)
Expand Down
4 changes: 2 additions & 2 deletions frame/support/procedural/src/pallet/expand/documentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl ToTokens for DocMetaValue {
/// Implement a `pallet_documentation_metadata` function to fetch the
/// documentation that is included in the metadata.
///
/// The documentation is placed at the top of the module similar to:
/// The documentation is placed on the pallet similar to:
///
/// ```ignore
/// #[pallet]
Expand All @@ -163,7 +163,7 @@ impl ToTokens for DocMetaValue {
/// which is the file path that holds the documentation to be added to the metadata.
///
/// Unlike the `doc` attribute, the documentation provided to the `proc_macro` attribute is
/// not inserted at the beginning of the module.
/// not added to the pallet.
pub fn expand_documentation(def: &mut Def) -> proc_macro2::TokenStream {
let frame_support = &def.frame_support;
let type_impl_gen = &def.type_impl_generics(proc_macro2::Span::call_site());
Expand Down
2 changes: 1 addition & 1 deletion frame/support/src/metadata_ir/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use scale_info::{
/// When the IR does not contain enough information to generate a specific version
/// of the runtime metadata an appropriate default value is used (ie, empty vector).
pub struct MetadataIR<T: Form = MetaForm> {
/// Palet metadata.
/// Pallet metadata.
pub pallets: Vec<PalletMetadataIR<T>>,
/// Metadata of the extrinsic.
pub extrinsic: ExtrinsicMetadataIR<T>,
Expand Down