Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Conversation

@montekki
Copy link
Contributor

A bit of updating to get it to work with latest changes in the substrate branch and other deps branches.

  • Removes NonZeroU32 type ids.
  • frame-metadata dep on scale-info bumped to git = "https://github.com/paritytech/scale-info", branch = "aj-substrate"
  • Hacky workaround since scale-info aj-substrate branch does not yet support TypeDefPhantom::type_param

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() */],
Copy link
Owner

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.

.next()
.expect("a phantom type should have a single type parameter");
let type_path = syn::parse_quote! { core::marker::PhantomData<#type_param> };
*/
Copy link
Owner

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.

@ascjones
Copy link
Owner

Thanks for this, I will merge this as is since I will need it now! Can fix anything in follow ups.

@ascjones ascjones merged commit 947521b into ascjones:master Aug 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants