Unexpected error message when using '-withReflectionCode'.
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.'.
Note that -withReflectionCode is the C++ Generator specific option - i.e. it doesn't exist for Python / Java generators.
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.
Moved to the backlog due to more urgent issues.
Moved from the backlog to the current milestone again because it turned out that we will need this for the new C++17 emitter.
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.