Protobuf supports having multiple files use the same package, but this doesn't work with hprotoc - the output is package_name.hs.
The way the Python & C++ compilers work, they strip .proto from the filename & use that for the basename of the output file, as opposed to using the package name.
Protobuf supports having multiple files use the same package, but this doesn't work with hprotoc - the output is
package_name.hs
.The way the Python & C++ compilers work, they strip
.proto
from the filename & use that for the basename of the output file, as opposed to using the package name.Python: https://github.com/google/protobuf/blob/master/src/google/protobuf/compiler/python/python_generator.cc#L88
C++: https://github.com/google/protobuf/blob/master/src/google/protobuf/compiler/cpp/cpp_generator.cc#L102
This might require setting a flag to keep backwards compatibility (--ignore-package-name).
These 2 files might make a good test:
a.proto:
b.proto: