This error message is confusing, because it references CompoundPredicate<AccountPredicateBox> which is, in fact included in the types! invocation. The problem is that the type map from build_schemas() actually distinguishes between Boxed and non-Boxed types, while our schema JSON doesn't (and, therefore, those are assigned the same string-based type id).
I see two possible solutions:
If we want to enforce the presence of Boxed types in the schema, we should improve the test to actually track the original rust type names.
If we don't need to Box copies, make the build_schemas() map based on the string identifiers, not rust TypeIds
How to reproduce:
Box<CompoundPredicate<AccountPredicateBox>>
from thetypes!
macro inschema/gen/lib.rs
tests::no_extra_or_missing_schemas
test iniroha_schema_gen
This error message is confusing, because it references
CompoundPredicate<AccountPredicateBox>
which is, in fact included in thetypes!
invocation. The problem is that the type map frombuild_schemas()
actually distinguishes betweenBox
ed and non-Box
ed types, while our schema JSON doesn't (and, therefore, those are assigned the same string-based type id).I see two possible solutions:
Box
ed types in the schema, we should improve the test to actually track the original rust type names.Box
copies, make thebuild_schemas()
map based on the string identifiers, not rustTypeId
s