Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Runtime API versioning #11779

Merged
merged 37 commits into from
Aug 13, 2022
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8db9c9f
Runtime API versioning
tdimitrov Jun 30, 2022
a773002
Update primitives/api/proc-macro/src/impl_runtime_apis.rs
tdimitrov Jul 25, 2022
89aa9fb
Code review feedback
tdimitrov Jul 30, 2022
5b216a1
fmt
tdimitrov Jul 30, 2022
39c645e
Apply suggestions from code review
tdimitrov Jul 30, 2022
8ede4f5
Code review feedback
tdimitrov Jul 30, 2022
ae545ee
dummy trait -> versioned trait
tdimitrov Jul 31, 2022
3d6c1f2
Implement only versioned traits (not compiling)
tdimitrov Aug 3, 2022
47d0b5a
Remove native API calls (still not compiling)
tdimitrov Aug 3, 2022
779c12f
fmt
tdimitrov Aug 4, 2022
a5b58ee
Fix compilation
bkchr Aug 4, 2022
01fbf97
Comments
tdimitrov Aug 4, 2022
13a9c5b
Remove unused code
tdimitrov Aug 4, 2022
ff57c73
Remove native runtime tests
tdimitrov Aug 4, 2022
12552c7
Remove unused code
tdimitrov Aug 4, 2022
b0d671e
Fix UI tests
tdimitrov Aug 4, 2022
a14970d
Code review feedback
tdimitrov Aug 4, 2022
694c802
Code review feedback
tdimitrov Aug 4, 2022
2e28503
attribute_names -> common
tdimitrov Aug 4, 2022
6e1e47a
Rework `append_api_version`
tdimitrov Aug 5, 2022
3bfa940
Code review feedback
tdimitrov Aug 8, 2022
3c4a80f
Apply suggestions from code review
tdimitrov Aug 8, 2022
9b7fcff
Code review feedback
tdimitrov Aug 8, 2022
845ecf1
Code review feedback
tdimitrov Aug 9, 2022
c9ea350
Code review feedback
tdimitrov Aug 9, 2022
acb7ce9
Use type alias for the default trait - doesn't compile
tdimitrov Aug 9, 2022
9a25165
Fixes
bkchr Aug 9, 2022
5d8f88f
Better error for `method_api_ver < trait_api_version`
tdimitrov Aug 10, 2022
4abe5bb
fmt
tdimitrov Aug 10, 2022
6e5e46e
Rework how we call runtime functions
bkchr Aug 11, 2022
99a69c9
Update UI tests
tdimitrov Aug 11, 2022
5a6b8b4
Fix warnings
tdimitrov Aug 11, 2022
693ebe3
Fix doctests
tdimitrov Aug 11, 2022
c45b763
Apply suggestions from code review
tdimitrov Aug 12, 2022
6803b29
Apply suggestions from code review
tdimitrov Aug 12, 2022
6a0b8e8
Fix formatting and small compilation errors
tdimitrov Aug 12, 2022
91ce8b1
Update primitives/api/proc-macro/src/impl_runtime_apis.rs
tdimitrov Aug 12, 2022
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
fmt
tdimitrov committed Aug 10, 2022
commit 4abe5bb1051d7c82550b45fee5bfbe6b88ae116b
5 changes: 4 additions & 1 deletion primitives/api/proc-macro/src/decl_runtime_apis.rs
Original file line number Diff line number Diff line change
@@ -400,7 +400,10 @@ fn generate_runtime_decls(decls: &[ItemTrait]) -> Result<TokenStream> {
let versioned_api_traits = generate_versioned_api_traits(decl.clone(), methods_by_version);

let main_api_ident = decl.ident.clone();
let versioned_ident = &versioned_api_traits.first().expect("There should always be at least one version.").ident;
let versioned_ident = &versioned_api_traits
.first()
.expect("There should always be at least one version.")
.ident;

result.push(quote!(
#[doc(hidden)]