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

Inconsistent handling of constant presence in groupSizeEncoding #918

Open
lukepalmer opened this issue Dec 1, 2022 · 1 comment
Open

Comments

@lukepalmer
Copy link

lukepalmer commented Dec 1, 2022

I'm new here, but believe I observe the following:

For the composite 'groupSizeEncoding' an encoder/decoder class will be generated, but not used. Code for handling the repeating group will be separately generated at point of usage based on the composite definition in the spec. This is, at least, confusing.

If the blockLength type interior to groupSizeEncoding is specified like:
<type name="blockLength" primitiveType="uint16" presence="constant">0</type>

The unused generated decoder will correctly implement the constant presence, but the point of usage code will ignore constant presence. The two copies of the code will have incompatible size and offsets. This seems incorrect.

Would it be accurate to say that constant presence for blockLength is not supported? If so, would it make sense for a specification like this to cause an error, rather than generating unexpected code?

@mjpt777
Copy link
Contributor

mjpt777 commented Dec 2, 2022

Can you provide a worked example for what you are trying to achieve with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants