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:
- #1 – Unexpected constraints difference
- May be not relevant if not using
cabal freeze
- I'm assuming
cabal install --enable-tests --dry-run
would matchcabal sandbox hc-pkg list
. I haven't confirmed though.
- May be not relevant if not using
- #36 – Pass flags to cabal freeze to ensure all targets are included
- Skips using
cabal freeze
altogether and grabs the testing dependencies correctly
- Skips using
- #41 – Improve Stackage support
- Avoids issues with
cabal freeze
not respecting constraints - Should work with Stackage with a
cabal.config
file located in the app directory
- Avoids issues with
- haskell/cabal#1908 – Self-constraint generated by 'freeze'
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 formatcabal 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...?
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.