Generated file/module names inconsistency?
Currently, for:
- file
Shapes.protowith package namedinterproc - we get purs file
Shapes.Interproc.purswith module nameInterproc.Shapes
Was it intended to be this way?
Yes it was intended this way. Maybe there is a better way.
- For each
*.protofile we generate one*.pursfile. - I like
Shapes.protoandShapes.Interproc.pursto be close to each other in alphabetical order for file browsing. protocallows multiple files to have the same package name, but PureScript requires each file to have a different module name.
https://github.com/rowtype-yoga/purescript-protobuf/blob/dbe4d5039b8bd73b72936d22aba483ab642dfc5a/plugin/ProtocPlugin/Main.purs#L158-L160
So each generated Shapes.Interproc.purs file includes both the original file name and the protoc package name so that the generated file name is distinct, and the generated file name is the same as the PureScript module name.
I like Shapes.proto and Shapes.Interproc.purs to be close to each other in alphabetical order for file browsing.
I currently put proto files in a separate folder, and generated files into the src, also I usually have files sorted by extension files first in IDE exlorer.
Anyway, to me it just seems kinda strange to see file Shapes.Interproc.purs with module Interproc.Shapes inside.
I believe you also prefer to use small caps so purs file is called shapes.Interproc.purs.
I'm not sure how to make it better, I just pointed to this confusing moment in naming.