JuliaIO / ProtoBuf.jl

Julia protobuf implementation
Other
205 stars 55 forks source link

use `ProtoBuf.EnumX` in generated files #219

Closed ExpandingMan closed 2 years ago

ExpandingMan commented 2 years ago

Has any thought been given to using ProtoBuf.Enumx instead of EnumX in generated files? This is arguably a discouraged practice, but it would eliminate the need to add EnumX explicitly to an environment. A good justification for it in this case is that it is being used for code that was generated by ProtoBuf.jl so it's as if it were being used in internal ProtoBuf module code.

quinnj commented 2 years ago

Not a bad idea.

Drvi commented 2 years ago

@ExpandingMan would you do the honors?:) https://github.com/JuliaIO/ProtoBuf.jl/blob/5825e54eebbb1c6a5851d77336a3fa8891fa45b7/src/codegen/toplevel_definitions.jl#L178

(and in test_codegen.jl)