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

"version of Cabal has changed" #2611

Closed
snoyberg opened this issue May 27, 2015 · 6 comments
Closed

"version of Cabal has changed" #2611

snoyberg opened this issue May 27, 2015 · 6 comments

Comments

@snoyberg
Copy link
Collaborator

I know I've reported this issue before on issues that have been closed. There may currently be an open issue on this as well, I'm not certain. This issue has not been resolved, however, and seems to be easy to trigger:

  1. Install a version of cabal-install with a different Cabal-library major version than what ships with GHC
  2. Run cabal install -j to do a parallel build
  3. Run cabal build

This results in the error message:

cabal: You need to re-run the 'configure' command. The version of Cabal being used has changed (was Cabal-1.18.1.5, now Cabal-1.22.2.0).

>ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.4
>ghc-pkg list Cabal
WARNING: cache is out of date: C:/Users/Michael/AppData/Local/Programs/minghc-7.8.4-i386/ghc-7.8.4\lib\package.conf.d\package.cache
Use 'ghc-pkg recache' to fix.
C:/Users/Michael/AppData/Local/Programs/minghc-7.8.4-i386/ghc-7.8.4\lib\package.conf.d:
    Cabal-1.18.1.5

C:\Users\Michael\AppData\Roaming\ghc\i386-mingw32-7.8.4\package.conf.d:
    (no packages)
>cabal --version
cabal-install version 1.22.2.0
using version 1.22.2.0 of the Cabal library

I performed this test on Windows, but it's occurred to me on Linux many times too.

@23Skidoo 23Skidoo self-assigned this May 27, 2015
@23Skidoo
Copy link
Member

This is sort of expected behaviour (see #2438, #1938), but since it keeps causing problems, we should add a workaround. I suggest that setupWrapper should pick the external setup method even for build-type: Simple when the package is already configured and the appropriate version of Cabal is installed.

@23Skidoo
Copy link
Member

Alternatively, we can re-run configure automatically instead of printing an error message. I believe @ttuegel was looking into making that happen.

@ttuegel
Copy link
Member

ttuegel commented May 27, 2015

Yes, I have a branch which automatically reconfigures whenever necessary. I just need to do some testing with newer cabal-install vs. older Cabal to be sure they integrate correctly, then I'll make a PR.

@23Skidoo 23Skidoo removed their assignment May 27, 2015
@bitemyapp
Copy link
Contributor

@ttuegel it would be really lovely to see that go live, thank you! 🐻

@dcoutts
Copy link
Contributor

dcoutts commented Jun 1, 2015

Another fix is here #2633.

@23Skidoo
Copy link
Member

Since #2633 has been merged, this can now be closed.

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

No branches or pull requests

5 participants