Skip to content

Implement ghc/cabal compatiblity matrix - #5165

Merged
hvr merged 2 commits into
haskell:masterfrom
hvr:pr/issue-415
Feb 26, 2018
Merged

hvr merged 2 commits into
haskell:masterfrom
hvr:pr/issue-415

Conversation

@hvr

@hvr hvr commented Feb 24, 2018

Copy link
Copy Markdown
Member

This addresses #415

This injects lower-bound constraints on Cabal for custom setup
dependencies to prevent the solver from selecting unsupported
configurations.

Previously we already added an absolute lower bound Cabal >= 1.20
for nix-local builds, as that's the minimum version we need to be able
to interact with custom Setup.hs scripts. This refines with logic by
restricting that lower bound even more based on GHC version.

This patch augments this with the following rules:

  • GHC 8.4+ constrains Cabal >= 2.2
  • GHC 8.2 constrains Cabal >= 2.0
  • GHC 8.0 constrains Cabal >= 1.24
  • GHC 7.10 constrains Cabal >= 1.22
  • (default constraint Cabal >= 1.20)

This only affects nix-style local builds codepaths.


Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.

This injects lower-bound constraints on Cabal for custom setup
dependencies to prevent the solver from selecting unsupported
configurations.

Previously we already added an absolute lower bound `Cabal >= 1.20`
for nix-local builds, as that's the minimum version we need to be able
to interact with custom Setup.hs scripts. This refines with logic by
restricting that lower bound even more based on GHC version.

This patch augments this with the following rules:

- GHC 8.4+   constrains  Cabal >= 2.2
- GHC 8.2    constrains  Cabal >= 2.0
- GHC 8.0    constrains  Cabal >= 1.24
- GHC 7.10   constrains  Cabal >= 1.22
- (default   constraint  Cabal >= 1.20)

This only affects nix-style local builds codepaths.
@hvr
hvr requested a review from 23Skidoo February 24, 2018 17:12
@hvr hvr added the cabal-install: v2-build system Affecting v2-build and related commands that use v2-architecture (aka "nix local builds"). label Feb 24, 2018
@23Skidoo

Copy link
Copy Markdown
Member

Restarted the failed builds.

@23Skidoo 23Skidoo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me.

@hvr

hvr commented Feb 26, 2018 •

Copy link
Copy Markdown
Member Author

The testsuite failure in

PackageTests/TestSuiteTests/ExeV10/cabal-with-hpc.multitest.hs:49:15: error:
    • Couldn't match type ‘Control.Monad.Trans.Reader.ReaderT
                             TestEnv m0’
                     with ‘transformers-0.5.2.0:Control.Monad.Trans.Reader.ReaderT
                             TestEnv IO’

is unrelated; this still worked 2 days ago when I created this PR; and in fact, we'd see the same failure on master.

But I'm not sure what caused this, nor was I able to reproduce it locally yet.

@hvr
hvr merged commit a503345 into haskell:master Feb 26, 2018
hvr added a commit that referenced this pull request Feb 28, 2018
Implement ghc/cabal compatiblity matrix (#415)

(backported #5165)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cabal-install: v2-build system Affecting v2-build and related commands that use v2-architecture (aka "nix local builds").

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants