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

Unexpected error message when using '-withReflectionCode'. #624

Closed
MisterGC opened this issue May 31, 2024 · 5 comments
Closed

Unexpected error message when using '-withReflectionCode'. #624

MisterGC opened this issue May 31, 2024 · 5 comments
Assignees
Labels
bug Something isn't working core Zserio core module
Milestone

Comments

@MisterGC
Copy link
Contributor

Describe the bug
When I call zserio myschema.zs -withReflectionCode -python zs_gen_api, I get:

Parsing myschema.zs
Calling C++11 Generator extension check
[ERROR] C++11 Generator: The specified option 'withReflectionCode' needs enabled type info code ('withTypeInfoCode')!

But I haven't used the C++(11) support of zserio.

Expected behavior
zserio should not produce error messages for target languages I don't use. In addition withReflectionCode should just activate withTypeInfo if it is necessary. Imo there is nothing wrong with saying 'reflection covers type infos too.'.

@MisterGC MisterGC added the bug Something isn't working label May 31, 2024
@Mi-La
Copy link
Contributor

Mi-La commented May 31, 2024

Note that -withReflectionCode is the C++ Generator specific option - i.e. it doesn't exist for Python / Java generators.

@mikir
Copy link
Contributor

mikir commented May 31, 2024

Thanks to point this out. I agree that this behaviour is misleading.

I think, we can move the checking of the command lines arguments from the cross language checking phase to the processing phase. This will avoid such failures. We will do it within the current milestone.

The cross language checking phase has been introduced to find out that something will be clashed in the corresponding language even if the language is currently not used.

Regarding -withReflectionCode option, we have a problem that currently all options are shared between extensions. So, if -withReflectionCode enforced -withTypeInfoCode, it would cause silently generation of type info code for Python. Which is probably not intended.

@mikir mikir added this to the 2.15 milestone May 31, 2024
@mikir mikir added the core Zserio core module label May 31, 2024
@mikir
Copy link
Contributor

mikir commented Aug 9, 2024

Moved to the backlog due to more urgent issues.

@mikir mikir modified the milestones: 2.15, Backlog Aug 9, 2024
@mikir
Copy link
Contributor

mikir commented Sep 26, 2024

Moved from the backlog to the current milestone again because it turned out that we will need this for the new C++17 emitter.

@mikir mikir modified the milestones: Backlog, 2.15 Sep 26, 2024
@mikir mikir self-assigned this Oct 1, 2024
@mikir
Copy link
Contributor

mikir commented Oct 2, 2024

We will just move the checking of the command lines arguments from the cross language checking phase to the processing phase in C++. No other extensions suffer from this problem.

@mikir mikir closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Zserio core module
Projects
None yet
Development

No branches or pull requests

3 participants