Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Roman- opened this issue Mar 27, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Roman-
Copy link
Collaborator

Roman- commented Mar 27, 2023

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)

@Roman- Roman- added the bug Something isn't working label Mar 27, 2023
meded90 pushed a commit to meded90/messgen that referenced this issue Mar 31, 2023
meded90 pushed a commit to meded90/messgen that referenced this issue Mar 31, 2023
meded90 pushed a commit to meded90/messgen that referenced this issue Apr 3, 2023
@meded90
Copy link
Collaborator

meded90 commented Apr 3, 2023

#36 same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants