Closed recursion-ninja closed 5 years ago
The tool hpack
might be useful for automatically generating the .cabal
files for our many sub-libraries, integration tests, and executables without repeating a lot of boilerplate specification manually for each "build target". Right now we are duplicating the litany of GHC flags to pass to each build target, along with the relevant FFI information if applicable.
I'm going to first break the monolithic .cabal
file into proper sub-libraries, then explore using hpack
to add a bit of sanity to maintaining all of the sub-library's specifications.
This has been completed. See this commit 317f8f8.
I didn't incorporate hpack
because it doesn't appear that you can shared data between packages in a project and the goal was to not duplicate information across our many packages and executable.
Currently we have many internal libraries in a single
.cabal
file. There are a number of issues with ths:stack
.cabal
file is monolithic and difficult to locate informationIdeally, we would have a dozen individual libraries that can all be build separately and a halve-dozen executable to be build individually.
This should speed up build times and serve to increase clarity.