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

`stack setup --upgrade-cabal` doesn't work for Cabal-2.2.0.1 + ghc-8.2.2 #4070

Closed
mgsloan opened this Issue Jun 9, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@mgsloan
Collaborator

mgsloan commented Jun 9, 2018

Steps to reproduce

stack --resolver lts-11.11 setup --upgrade-cabal

Expected

Upgrades cabal version (I have Cabal-2.0.1.0 installed, but this attempts to install Cabal-2.2.0.1)

Actual

Version 1.8.0, Git revision 33d6eddb065f26ea31936434eff062c60aab1d6a (dirty) (5867 commits) x86_64 hpack-0.28.2
2018-06-09 12:46:14.249903: [debug] Checking for project config at: /home/mgsloan/fpco/test-stack/stack.yaml
@(src/Stack/Config.hs:850:9)
2018-06-09 12:46:14.250118: [debug] Checking for project config at: /home/mgsloan/fpco/stack.yaml
@(src/Stack/Config.hs:850:9)
2018-06-09 12:46:14.250169: [debug] Checking for project config at: /home/mgsloan/stack.yaml
@(src/Stack/Config.hs:850:9)
2018-06-09 12:46:14.250210: [debug] Checking for project config at: /home/stack.yaml
@(src/Stack/Config.hs:850:9)
2018-06-09 12:46:14.250247: [debug] Checking for project config at: /stack.yaml
@(src/Stack/Config.hs:850:9)
2018-06-09 12:46:14.250279: [debug] No project config file found, using defaults.
@(src/Stack/Config.hs:880:13)
2018-06-09 12:46:14.251494: [debug] Using resolver: lts-11.11 specified on command line
@(src/Stack/Config.hs:546:7)
2018-06-09 12:46:14.251627: [debug] Run from outside a project, using implicit global project config
@(src/Stack/Config.hs:570:13)
2018-06-09 12:46:14.251912: [debug] Decoding build plan from: /home/mgsloan/.stack/build-plan/lts-11.11.yaml
@(src/Stack/Snapshot.hs:164:5)
2018-06-09 12:46:14.251967: [debug] Trying to decode /home/mgsloan/.stack/build-plan-cache/lts-11.11.cache
@(src/Stack/Snapshot.hs:156:32)
2018-06-09 12:46:14.257895: [debug] Success decoding /home/mgsloan/.stack/build-plan-cache/lts-11.11.cache
@(src/Stack/Snapshot.hs:156:32)
2018-06-09 12:46:14.258782: [debug] Run process: /sbin/ldconfig -p
@(src/Stack/Setup.hs:580:22)
2018-06-09 12:46:14.260565: [debug] Process finished in 2ms: /sbin/ldconfig -p
@(src/Stack/Setup.hs:580:22)
2018-06-09 12:46:14.260958: [debug] Found shared library libtinfo.so.5 in 'ldconfig -p' output
@(src/Stack/Setup.hs:589:29)
2018-06-09 12:46:14.261421: [debug] Did not find shared library libtinfo.so.6
@(src/Stack/Setup.hs:603:38)
2018-06-09 12:46:14.261502: [debug] Did not find shared library libncursesw.so.6
@(src/Stack/Setup.hs:603:38)
2018-06-09 12:46:14.261558: [debug] Found shared library libgmp.so.10 in 'ldconfig -p' output
@(src/Stack/Setup.hs:589:29)
2018-06-09 12:46:14.261631: [debug] Did not find shared library libgmp.so.3
@(src/Stack/Setup.hs:603:38)
2018-06-09 12:46:14.261665: [debug] Potential GHC builds: standard
@(src/Stack/Setup.hs:632:9)
2018-06-09 12:46:14.261703: [debug] Found already installed GHC builds: standard
@(src/Stack/Setup.hs:458:13)
2018-06-09 12:46:14.262452: [info] Manipulating the global Cabal is only for debugging purposes
@(src/Stack/Setup.hs:688:5)
2018-06-09 12:46:14.262517: [debug] Trying to decode /home/mgsloan/.stack/indices/Hackage/01-index.cache
@(src/Stack/PackageIndex.hs:411:23)
2018-06-09 12:46:14.409854: [debug] Success decoding /home/mgsloan/.stack/indices/Hackage/01-index.cache
@(src/Stack/PackageIndex.hs:411:23)
2018-06-09 12:46:14.412436: [debug] Getting Cabal package version
@(src/Stack/GhcPkg.hs:180:5)
2018-06-09 12:46:14.412542: [debug] Run process: /home/mgsloan/.stack/programs/x86_64-linux/ghc-8.2.2/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(src/Stack/GhcPkg.hs:76:10)
2018-06-09 12:46:14.425545: [debug] Process finished in 13ms: /home/mgsloan/.stack/programs/x86_64-linux/ghc-8.2.2/bin/ghc-pkg --no-user-package-db field --simple-output Cabal version
@(src/Stack/GhcPkg.hs:76:10)
2018-06-09 12:46:14.425780: [info] Installing Cabal-2.2.0.1 to replace 2.0.1.0
@(src/Stack/Setup.hs:722:9)
2018-06-09 12:46:14.624308: [debug] Run process within /tmp/stack-cabal-upgrade13671/Cabal-2.2.0.1/: /home/mgsloan/.stack/programs/x86_64-linux/ghc-8.2.2/bin/ghc Setup.hs
@(src/Stack/Setup.hs:739:43)
[  1 of 216] Compiling Distribution.Compat.Binary ( Distribution/Compat/Binary.hs, Distribution/Compat/Binary.o )
[  2 of 216] Compiling Distribution.Compat.Directory ( Distribution/Compat/Directory.hs, Distribution/Compat/Directory.o )
[  3 of 216] Compiling Distribution.Compat.Exception ( Distribution/Compat/Exception.hs, Distribution/Compat/Exception.o )
[  4 of 216] Compiling Distribution.Compat.Internal.TempFile ( Distribution/Compat/Internal/TempFile.hs, Distribution/Compat/Internal/TempFile.o )
[  5 of 216] Compiling Distribution.Compat.Map.Strict ( Distribution/Compat/Map/Strict.hs, Distribution/Compat/Map/Strict.o )
[  6 of 216] Compiling Distribution.Compat.MonadFail ( Distribution/Compat/MonadFail.hs, Distribution/Compat/MonadFail.o )
[  7 of 216] Compiling Distribution.Compat.Newtype ( Distribution/Compat/Newtype.hs, Distribution/Compat/Newtype.o )
[  8 of 216] Compiling Distribution.Compat.Semigroup ( Distribution/Compat/Semigroup.hs, Distribution/Compat/Semigroup.o )
[  9 of 216] Compiling Distribution.Compat.Stack ( Distribution/Compat/Stack.hs, Distribution/Compat/Stack.o )
[ 10 of 216] Compiling Distribution.Compat.Prelude ( Distribution/Compat/Prelude.hs, Distribution/Compat/Prelude.o )
[ 11 of 216] Compiling Distribution.Compat.ReadP ( Distribution/Compat/ReadP.hs, Distribution/Compat/ReadP.o )
[ 12 of 216] Compiling Distribution.Compat.Parsing ( Distribution/Compat/Parsing.hs, Distribution/Compat/Parsing.o )

Distribution/Compat/Parsing.hs:61:1: error:
    Could not find module ‘Text.Parsec’
    Use -v to see a list of the files searched for.
   |
61 | import qualified Text.Parsec as Parsec
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Received ExitFailure 1 when running
Raw command: /home/mgsloan/.stack/programs/x86_64-linux/ghc-8.2.2/bin/ghc Setup.hs
Run from: /tmp/stack-cabal-upgrade13671/Cabal-2.2.0.1/

Side note: I found the message "Manipulating the global Cabal is only for debugging purposes" to be surprising. I find the phrasing to be quite humorous, but this does not match with my understanding of --upgrade-cabal. It was added in 90ae9ec#diff-4968f87e674615592e572f2ec593e5b0R636

Stack version

$ stack --version
Version 1.8.0, Git revision 33d6eddb065f26ea31936434eff062c60aab1d6a (dirty) (5867 commits) x86_64 hpack-0.28.2

Method of installation

Installed via stack install in latest git repo.

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jun 26, 2018

My recommendation: this feature is already basically deprecated with:

Manipulating the global Cabal is only for debugging purposes

Let's officially deprecate it, and have it print a big warning message when used with GHC 8.2 or later.

@snoyberg snoyberg closed this in edc6304 Jun 29, 2018

snoyberg added a commit that referenced this issue Jun 29, 2018

Merge pull request #4118 from commercialhaskell/4070-deprecate-upgrad…
…e-cabal

Deprecate the --upgrade-cabal flag (fixes #4070)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment