awakesecurity / proto3-suite

Haskell Protobuf Implementation

Home Page:https://hackage.haskell.org/package/proto3-suite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Distinct proto3 identifiers map to the same Haskell identifier

j6carey opened this issue · comments

The underscores get removed; see the example .proto file (renamed to .txt to please GitHub):

test.proto.txt

looks like dotProtoEnumD is camel casing all the constructors with:

sequence [ (i,) <$> (prefixedConName enumName =<< ...

which call typeLikeName, which call camelCase and then transform sequence of (non leading) _ alpha into upper(alpha).

I can think of 2 ways to fix, either looking for duplicate and finding a backup name for a duplicate, or finding a name format that conserve _