This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ascjones
reviewed
Jun 18, 2021
core/src/generate_types.rs
Outdated
@@ -114,7 +114,7 @@ impl<'a> TypeGenerator<'a> { | |||
TypeDef::Sequence(seq) => vec![seq.type_param().id()], | |||
TypeDef::Tuple(tuple) => tuple.fields().iter().map(|f| f.id()).collect(), | |||
TypeDef::Compact(compact) => vec![compact.type_param().id()], | |||
TypeDef::Phantom(phantom) => vec![phantom.type_param().id()], | |||
TypeDef::Phantom(_phantom) => vec![/* TODO [now]: this is not yet in the `aj-substrate` branch phantom.type_param().id() */], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I have remove that here: paritytech/scale-info#96, and aj-substrate
includes that PR. We need to figure out whether we still have enough information to generate the correct types. We probably should, but it needs testing out on this side.
ascjones
reviewed
Jun 18, 2021
ascjones
reviewed
Jun 21, 2021
core/src/generate_types.rs
Outdated
let type_param = params | ||
.iter() | ||
.next() | ||
.expect("a phantom type should have a single type parameter"); | ||
let type_path = syn::parse_quote! { core::marker::PhantomData<#type_param> }; | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, aj-substrate
is in flux atm - should stabilize in the next day or two once I get polkadot
compiling.
Thanks for this, I will merge this as is since I will need it now! Can fix anything in follow ups. |
ascjones
approved these changes
Aug 24, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A bit of updating to get it to work with latest changes in the substrate branch and other deps branches.
NonZeroU32
type ids.frame-metadata
dep onscale-info
bumped togit = "https://github.com/paritytech/scale-info", branch = "aj-substrate"
scale-info
aj-substrate
branch does not yet supportTypeDefPhantom::type_param