mietek/halcyon

Use `cabal install --enable-tests --dependencies-only --dry-run` instead of `cabal freeze`?

danclien opened this issue · 8 comments

Doing cabal install --enable-tests --dependencies-only --dry-run in a clean sandbox gives similar results to using cabal freeze. This would help resolve/avoid the following issues:

I grabbed the output of both on one of our internal projects, and the output can be seen here. Output from cabal freeze was altered using sed to make differences easier to notice.

Major differences:

  • cabal freeze includes packages included with GHC. e.g. The ones listed in /app/ghc/lib/ghc-7.8.4/package.conf.d
  • cabal freeze has a cleaner, more consistent output format
    • cabal install --enable-tests --dry-run indicated when there a newer version
    • e.g. blaze-builder-0.3.3.4 (latest: 0.4.0.1)

Thank you. This is a model feature request. Much appreciated.

Getting rid of cabal freeze would also avoid haskell/cabal#1908, which is still an issue for cabal-install versions prior to 1.22.0.0, and requires a workaround.

Another benefit is, the GHC version would not be automatically over-constrained.

Currently, since cabal freeze includes a version constraint for the base package, the GHC version is constrained down to the point release; e.g. base-4.7.0.2 constrains GHC to 7.8.4, and not just 7.8.

As a consequence, declaring HALCYON_GHC_VERSION in a magic file should be allowed.

Replacing cabal freeze would also allow using cabal-install versions prior to 1.20.0.0.

What's needed to do this? Are we waiting for an update to cabal, or is it parsing a different format, or...?

@thorinii: In a word, time — to design, and to implement.

Perhaps it’d be worth to consider supporting separate sets of version constraints for different GHC versions. Perhaps even separate .halcyon/$GHC_VERSION directories.

I’m sorry. This project is no longer maintained.