-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
https://github.com/3reality-wangzhijie/commsdsl-min-demo-for-bug
commsdsl2comms -s --warn-as-err -o out/gen ./prot2.xml ./prot1.xml prot2.1.xmlprot2 and prot1 define two separate schemas. prot2.1.xml references the global fields defined in prot1.
When the input files are provided in the above order, the generated read method of variant U contains an issue:
template <typename TIter>
comms::ErrorStatus read(TIter& iter, std::size_t len)
{
reset();
using CommonKeyField=
comms::field::IntValue<
::field::FieldBase<>,
std::uint8_t,
comms::option::def::FailOnInvalid<>,
comms::option::def::FixedValue
>;
....The main namespace in its KEY_FIELD_TYPE is missing. I attempted to debug this issue, but the codebase is quite complex and I haven't been able to trace through it for the time being.
Changing the input order generates the correct code:
commsdsl2comms -s --warn-as-err -o out/gen ./prot1.xml ./prot2.xml prot2.1.xmlHowever, this causes prot2 to become the main schema, while my intended behavior is for prot1 to be the main schema.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working