amnh / PCG

𝙋𝙝𝙮𝙡𝙤𝙜𝙚𝙣𝙚𝙩𝙞𝙘 𝘾𝙤𝙢𝙥𝙤𝙣𝙚𝙣𝙩 𝙂𝙧𝙖𝙥𝙝 ⸺ Haskell program and libraries for general phylogenetic graph search
28 stars 1 forks source link

Use hpack for cabal file specification #156

Closed recursion-ninja closed 4 years ago

recursion-ninja commented 4 years ago

We repeat ourselves a lot in our various sub libraries. One such example is the GHC flags which are the same in every library.

hpack promises to reduce duplication.

See branch hpack-generation for changes.

Invoke the following to generate the .cabal files:

$ make run-hpack

recursion-ninja commented 4 years ago

@Boarders, take a peak at the hpack-generation branch. If you think it's a step forward, merge it into master.

Boarders commented 4 years ago

I'll give it a look.

recursion-ninja commented 4 years ago

Also, builds with cabal are failing because cassava is messed up, and cassava is a dependency of criterion...

Builds with stack work because of some dependency graph black magic.

Boarders commented 4 years ago

I am not too keen on giving up cabal builds so we might want to hold off on a merge until it is solved.

recursion-ninja commented 4 years ago

I agree. However I don't think hpack caused this issue, I think it just brought it to our attention again by requiring all dependencies for all build targets. I think that if you try and build any build target that depends on criterion you will encounter this problem. We can test my hypothesis by trying to build the pcg-file-parsers:bench-time build target on master, which depends on criterion and does not use hpack.

Boarders commented 4 years ago

Yes, I just don't think we should break the ability to build any library with cabal until it is fixed. Currently we mostly will be incapable of building benchmarks but not the inability to build the project itself nor individual libraries. I don't think it is worth just giving that up.

recursion-ninja commented 4 years ago

Yeah, again I agree. I think the real solution is probably having the library maintainer of cassava fix their library instead of us trying to repeatedly apply bandaids. I can open an issue when I return.

recursion-ninja commented 4 years ago

I opened an issue: https://github.com/haskell-hvr/cassava/issues/177

recursion-ninja commented 4 years ago

I got information from @RyanScott to resolve the cassava for us.

recursion-ninja commented 4 years ago

We should explore #158, and decide between which approach offers the easiest maintainability.

recursion-ninja commented 4 years ago

Decided on #158 over this approach.