Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-buildable bug in Cabal <= 1.22 #3632

Merged
merged 1 commit into from
Dec 10, 2017
Merged

Conversation

snoyberg
Copy link
Contributor

@snoyberg snoyberg commented Dec 8, 2017

Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Please also shortly describe how you tested your change. Bonus points for added tests!

@snoyberg
Copy link
Contributor Author

snoyberg commented Dec 8, 2017

@borsboom If we're keeping a maintenance branch for future 1.6 point releases, this is a could candidate for inclusion, as it's a relatively low impact change.

--
-- Note that for Cabal versions 1.22 and earlier, there is a bug where
-- Cabal requires dependencies for non-buildable components to be
-- present. We're going to use GHC version as a proxy for Cabal
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I don't see the reasoning of using a GHC version as a proxy for the cabal version. AFAIU you can use Cabal 2 with GHC 7.8

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I considered going that route, but it's a much bigger diff, and gets into a bit of a circular issue, since we need to know the version of the Cabal library before we've finished calculating the build plan. The way I've written it, we'll occasionally (but rarely) get some unnecessary extra packages built if someone is using old GHC + new Cabal, but won't get any breakage (since you can't use old Cabal with a new GHC).

Copy link
Contributor

Choose a reason for hiding this comment

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

I see! Alright fair 'nough

@borsboom
Copy link
Contributor

borsboom commented Dec 8, 2017

If we're keeping a maintenance branch for future 1.6 point releases, this is a could candidate for inclusion, as it's a relatively low impact change.

The stable branch is perfect for this. Feel free to retarget this PR to that branch, or cherry-pick it after merging to master.

@snoyberg snoyberg force-pushed the cabal-non-buildable-bug branch from 5d95da7 to 2a52ac2 Compare December 10, 2017 07:53
@snoyberg snoyberg changed the base branch from master to stable December 10, 2017 07:54
@snoyberg
Copy link
Contributor Author

Rebased against stable. After Travis passes, I'll merge and then merge stable to master.

@snoyberg snoyberg merged commit 3f72ff9 into stable Dec 10, 2017
@snoyberg snoyberg deleted the cabal-non-buildable-bug branch December 10, 2017 13:10
@snoyberg
Copy link
Contributor Author

For posterity, here's the original Cabal bug: haskell/cabal#1725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants