You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently every proto file needs to be specified twice in the .cabal file: the raw .proto file in extra-src-files, and the Proto.* module in exposed-modules/other-modules.
From very basic experiments with stack, I think it's possible to drop the latter requirement and have our Setup script populate the list of Haskell modules automatically, by changing the PackageDescription and/or LocalBuildInfo.
In addition to less redundancy, this will help with:
Integrate better with hpack (in particular, its ability to autodetect the exposed-modules and other-modules)
The exact design of this feature is still an open question: can (should?) we provide control to the user over whether their protos end up in exposed-modules or other-modules? Or in individual components (e.g. tests, executables or benchmarks)? For example, proto-lens-combinators contains a proto test file which is test-only and not intended to be exported from the library.
The text was updated successfully, but these errors were encountered:
I'm closing this ticket due to lack of progress. Also, in hindsight, it's important to let the user specify which generated modules end up in which package components (libraries,binaries,tests,...) so I don't think there's a good way to automate this.
Additionally, I think globs/wildcards remove most of the noise from the redundancy. For example, in proto-lens-tests we just say:
extra-source-files: tests/*.proto
and then list the modules we actually want to generate in the rest of the .cabal file.
Currently every proto file needs to be specified twice in the
.cabal file
: the raw.proto
file inextra-src-files
, and theProto.*
module inexposed-modules
/other-modules
.From very basic experiments with stack, I think it's possible to drop the latter requirement and have our Setup script populate the list of Haskell modules automatically, by changing the
PackageDescription
and/orLocalBuildInfo
.In addition to less redundancy, this will help with:
hpack
(in particular, its ability to autodetect theexposed-modules
andother-modules
)The exact design of this feature is still an open question: can (should?) we provide control to the user over whether their protos end up in
exposed-modules
orother-modules
? Or in individual components (e.g. tests, executables or benchmarks)? For example,proto-lens-combinators
contains a proto test file which is test-only and not intended to be exported from the library.The text was updated successfully, but these errors were encountered: