-
Notifications
You must be signed in to change notification settings - Fork 258
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
codegen broken by BinaryHeap
in metadata
#1515
Comments
This will be fixed by bumping scale-typegen to v0.2.1 in the subxt-cli |
Released now |
I am having some trouble with this issue still (I think it may be the same issue). The codegen works after upgrading to 0.35.2 but using the generated code gives me errors related to the BinaryHeap:
|
Can you share how you are generating your codegen i.e, are you deriving Perhaps you can probably workaround that by substituting the BinaryHeap type generated by subxt #[subxt::subxt(
runtime_metadata_path = "artifacts/metadata.scale",
derive_for_all_types = "Clone, Debug, Eq, PartialEq",
derive_for_type(
path = "some_pallet::EnqueuedOrder",
derive = "Ord"
),
substitute_type(
path = "some_pallet:BinaryHeap",
with = "::std::collections::BinaryHeap"
),
)]
pub mod runtime {} |
We may need to map See Line 389 in c07ee0c
BinaryHeap thing in the same place here).
Why? Because So yeah; generating the code will work now because |
@claravanstaden is there any chance you could try out this branch of Subxt?: Fingers crossed that will resolve your issue, and if so, we'll merge it :) |
^ We tested it internally and it seemed to fix the issue, so for now this is closed but please do let us know if you run into something still with the latest |
We have now released subxt v0.35.3 which fixes this issue, let us know if you still encounter any issues |
@niklasad1 @jsdw |
The latest metadata in polkadot contains BinaryHeap which seems not be supported by subxt (this was added in scale_info v2.11)
Reproducible steps:
I think we have make another release of subxt-cli to bump
scale-typegen
to support the latest version of scale-infoThe text was updated successfully, but these errors were encountered: