Skip to content

JS messgen parser fails silently with improperly ordered complex message IDs #67

@Roman-

Description

@Roman-

In JS messgen parser, if the messages listed in a way that the ID of a complex message is less than the ID of one of its internal messages, the parser does not work and does not fire any error. Example:

bottle.yaml:

id: 67
fields:
  - { name: name,   type: string }
  - { name: liquid, type: liquid }

liquid.yaml:

id: 68
descr: "I am inside the bottle"
fields:
  - { name: density,      type: uint64 }
  - { name: is_coca_cola, type: uint8 }

Messgen would generate JS files without any warnings and successfully parse every message. However, when message "bottle" is received, it will have the following properties:

offset: NaN
isComplex: false (which is wrong)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions