-
Notifications
You must be signed in to change notification settings - Fork 94
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
Unable to build sp-runtime
after cargo update
#688
Comments
@Serial-ATA do you have a link to the repo? So, we can reproduce this. |
@bkchr https://github.com/tangle-network/gadget Specifically, the package in |
This returns success to me EDIT: but running |
My guess is that one PR has added EDIT: my new guess is that it is actually the |
we having the same issue here https://github.com/open-web3-stack/open-runtime-module-library/actions/runs/13042465350/job/36387082114 |
I think this is the fix: #689 |
Thank you for the report ! Taking a look. |
Yes, #689 should fix this. Yanked |
3.7.3 published |
@Serial-ATA @xlc please can you check if 3.7.3 fixed the issue ? |
Sorry there might still be some issue in regards to bounds: #691 |
open-web3-stack/open-runtime-module-library#1020 CI still failing |
The revert for 508 and 512 wasn't complete. Then it compiled due to the change in 616: So the PR 508 make use of compact type for max encoded len, So now staking doesn't compile because solution:
diff --git a/derive/src/max_encoded_len.rs b/derive/src/max_encoded_len.rs
index 8a592e1..d773096 100644
--- a/derive/src/max_encoded_len.rs
+++ b/derive/src/max_encoded_len.rs
@@ -85,14 +85,8 @@ fn fields_length_expr(fields: &Fields, crate_path: &syn::Path) -> proc_macro2::T
// caused the issue.
let expansion = fields_iter.map(|field| {
let ty = &field.ty;
- if utils::is_compact(field) {
- quote_spanned! {
- ty.span() => .saturating_add(<#crate_path::Compact::<#ty> as #crate_path::MaxEncodedLen>::max_encoded_len())
- }
- } else {
- quote_spanned! {
- ty.span() => .saturating_add(<#ty as #crate_path::MaxEncodedLen>::max_encoded_len())
- }
+ quote_spanned! {
+ ty.span() => .saturating_add(<#ty as #crate_path::MaxEncodedLen>::max_encoded_len())
}
});
quote! {
diff --git a/derive/src/max_encoded_len.rs b/derive/src/max_encoded_len.rs
index 8a592e1..f09f6c8 100644
--- a/derive/src/max_encoded_len.rs
+++ b/derive/src/max_encoded_len.rs
@@ -44,7 +44,7 @@ pub fn derive_max_encoded_len(input: proc_macro::TokenStream) -> proc_macro::Tok
None,
has_dumb_trait_bound(&input.attrs),
&crate_path,
- false,
+ true,
) {
return e.to_compile_error().into();
}
@@ -87,7 +87,9 @@ fn fields_length_expr(fields: &Fields, crate_path: &syn::Path) -> proc_macro2::T
let ty = &field.ty;
if utils::is_compact(field) {
quote_spanned! {
- ty.span() => .saturating_add(<#crate_path::Compact::<#ty> as #crate_path::MaxEncodedLen>::max_encoded_len())
+ ty.span() => .saturating_add(
+ <<#ty as #crate_path::HasCompact>::Type as #crate_path::MaxEncodedLen>::max_encoded_len()
+ )
}
} else {
quote_spanned! { |
sp-runtime
depends onparity-scale-codec
3.6.12 (https://crates.io/crates/sp-runtime/40.1.0/dependencies), and pinning it to that version makes it possible to build again.Running
cargo update
bumps the version to 3.7.2, which causes the following:The text was updated successfully, but these errors were encountered: