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

Remove --upgrade-cabal recommendation #3019

Merged
merged 4 commits into from
Feb 22, 2017
Merged

Conversation

snoyberg
Copy link
Contributor

As we started discussing on Slack, and related to #2795. The original issue is no longer present in Stack due to the usage of custom setup deps now being fully supported. If I manually remove the custom-setup stanza from the glib cabal file, the problem reappears. In theory, the right solution is to notice that there's a Cabal library present in the snapshot database and use that instead. I don't want to do that though, because:

  1. It will add extra code (and possibly a performance hit) to do all of the checking for Cabal library versions. I think this information is already loaded up by Stack, but if not, it's an extra ghc-pkg call, which isn't cheap.
  2. It adds some level of non-reproducibility to build plans, as the results will depend on whether we first ran stack build Cabal or not.

I've instead added a warning in the case of a missing custom-setup stanza. I believe this is the right approach: all of these build issues will disappear (in theory) with properly provided custom-setup, so we should be encouraging them.

I'd go so far as to say that, in the not-too-distant future, removing the ability to upgrade the global Cabal library entirely may be the right approach.

Pinging @lwm @borsboom

@snoyberg snoyberg added this to the P0: Blocking release milestone Feb 22, 2017
@decentral1se
Copy link
Member

all of these build issues will disappear (in theory) with properly provided custom-setup, so we should be encouraging them.

Ah right. I wasn't aware.

Thanks for the explanation.

I'd go so far as to say that, in the not-too-distant future, removing the ability to upgrade the global Cabal library entirely may be the right approach.

Have you seen #2995? Please do weigh in there if you think it's not something useful.

@borsboom
Copy link
Contributor

Sounds good

@snoyberg snoyberg merged commit 8b0ab0b into master Feb 22, 2017
@snoyberg snoyberg deleted the 2795-cabal-library-mismatch branch February 22, 2017 17:13
@snoyberg snoyberg mentioned this pull request Feb 22, 2017
2 tasks
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