zserio
zserio copied to clipboard
Generated file names can clash
Some generators create special source files which are not generated from zserio types directly.
Example:
C++ generates InspectorZserioNames.cpp/h
in root package directory. If user specifies zserio type InspectorZserioNames
in root package, these two generated files will overwrite each other.
The solution could be to store all generated file names and check the naming clash. The implementation can even rename generated sources to avoid clashing if needed.
Python on Windows can clash as well. This is because file names under Windows are case insensitive.
Example:
const int16 VALUE = 0xDEAD;
struct Value
{
bool hasValue;
};
This problem can be solved by amalgamation for Python and C++. Java does not support multiple top level classes, so amalgamation does not work.
We should at least eliminate generated file names which are not defined as the types in the sources. For example, SqlTableRow in Java.
This should be done within version 2.0.0 because this fix will change generated API.
Python on Windows can clash as well. This is because file names under Windows are case insensitive.
Example:
const int16 VALUE = 0xDEAD; struct Value { bool hasValue; };
This problem can be solved by amalgamation for Python and C++. Java does not support multiple top level classes, so amalgamation does not work.
This part will be solved by issue #87.
Python generates api.py
and when user creates structure Api.py
, it will also clash on Windows!