Merge type def into custom type id#42
Merge type def into custom type id#42ascjones wants to merge 78 commits intotype-metadata:masterfrom
Conversation
# Conflicts: # src/impls.rs
I will have a deeper look into the changes later.
How about just
No, we actually want to flatten the variants of
Yes please, and macros.
Why? Also we want to merge This way the whole |
Agreed was thinking the same thing.
This is an attempt to solve the original problem of
In this vein we could also combine the existing |
Please don't try to fix this problem in this PR. I have talked to JS guys and will think about a proper solution as a follow-up.
Hmmm interesting idea but I am hesistant to do this since struct type definitions generally refer to library types that can have generics etc. But yeah maybe you are right. Try to experiment with pros and cons of this approach please. Also I forgot to mention that we want to get rid of the |
I'll take it out, and potentially create a follow up PR with the same idea or similar with proper explanation. I think this also might be a proper solution. But better to separate it. Interested to hear your ideas too. |
This reverts commit 6bc10a2
Robbepop
left a comment
There was a problem hiding this comment.
LGTM all in all. some minor grumbles
|
Closing in favour of paritytech/scale-info#3 |
| TypeComposite::new("PhantomData", Namespace::prelude()) | ||
| .type_params(vec![T::meta_type()]) | ||
| .unit() | ||
| .into() |
There was a problem hiding this comment.
I thought against about this and I really think we should get rid of types like PhantomData from the serialization since its job is to only serialize what is important for decoding SCALE information. PhantomData is not important for this job.
WIP.
TypeIdtoTypeand merges inTypeDefflattened into 2 variantsProductandSumHasTypeDeftrait etc.AddsTypeId::Collectionvariant and definedVec<T>andBTreeMap<K, V>as collectionsStringstruct is now moved to prelude, distinct from theStrprimitivetodo
TypeIdstruct?TypeId::Collection(potentially can be added again later)ink!