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
There are a number of annoyances with how Cabal works around individual components builds:
Reconfiguring rewrites cabal_macros, leading to unnecessary recompiles
Copying fails if not all components are built
Requiring libraries to be installed if any of the components require them
After a lot of thought, I think the core problem is that the list of components to build should be an argument to ./Setup.hs configure, not ./Setup.hs build. Another way of thinking about that would be: even though a single cabal file contains multiple components, stack wants to treat each of those components as its own package. I think this will solve a lot of problems for us (like the ugly --enable-tests hack I added recently).
I'm considering pushing this forward on the Cabal side (where I- as usual- expect resistance), but wanted feedback from others first if there are downsides to this approach. I've also been thinking about short-term hacks to try to get this working. It's terribly ugly, but the thought that came to mind was to create temporary .cabal files during the build for each component.
If this rambling is too incoherent, please tell me and I can clarify.
The text was updated successfully, but these errors were encountered:
I personally wouldn't resist having cabal configure --enable-tests --test-suites=suite1,suite2, because sometimes I don't care about the third suite. Same applies to the executables and especially to the benchmarks!
There are a number of annoyances with how Cabal works around individual components builds:
After a lot of thought, I think the core problem is that the list of components to build should be an argument to
./Setup.hs configure
, not./Setup.hs build
. Another way of thinking about that would be: even though a single cabal file contains multiple components, stack wants to treat each of those components as its own package. I think this will solve a lot of problems for us (like the ugly --enable-tests hack I added recently).I'm considering pushing this forward on the Cabal side (where I- as usual- expect resistance), but wanted feedback from others first if there are downsides to this approach. I've also been thinking about short-term hacks to try to get this working. It's terribly ugly, but the thought that came to mind was to create temporary .cabal files during the build for each component.
If this rambling is too incoherent, please tell me and I can clarify.
The text was updated successfully, but these errors were encountered: