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

stackage check does not check for the cabal-install version #35

Closed
nomeata opened this issue Jan 25, 2013 · 5 comments
Closed

stackage check does not check for the cabal-install version #35

nomeata opened this issue Jan 25, 2013 · 5 comments

Comments

@nomeata
Copy link
Contributor

nomeata commented Jan 25, 2013

Hi,

it seems that both "stackage check" and "stackage build" require a specific version of the cabal binary, but only "stackage build" checks this.

Also, the error message should be clearer and indicate that it is the binary cabal in the path whose version is insufficient (and not the locally installed Cabal library, or the Cabal library in the build plan).

Thanks,
Joachim

@snoyberg
Copy link
Contributor

I don't believe check requires a specific version of the cabal-install binary, it should work with 0.14 as well as 1.16. Do you see something to imply otherwise?

As far as the error message, it's actually implying the correct thing. The requirement is that the library version it be built against be greater than 1.16. There were certain sandboxing bugs in the 1.14 version of the library that cause problems for Stackage in certain use cases (such as shared libraries), which is why we have the requirement for 1.16. Technically, the means we require cabal-install 1.16 as well, but that's not the main purpose of the check.

snoyberg added a commit that referenced this issue Jan 26, 2013
@nomeata
Copy link
Contributor Author

nomeata commented Jan 26, 2013

I am quite certain that the version of the cabal binary is checked in build and matters also for check, as shown by the following session:

> cabal clean
cleaning...
> cabal configure
Resolving dependencies...
Configuring stackage-0.1.0.0...
> ghc-pkg latest Cabal
Cabal-1.16.0
> ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.1.20121207
> cabal --version
cabal-install version 0.14.0
using version 1.14.0 of the Cabal library 
> cabal build
Building stackage-0.1.0.0...
Preprocessing library stackage-0.1.0.0...
[ 1 of 15] Compiling Stackage.Types   ( Stackage/Types.hs, dist/build/Stackage/Types.o )
[ 2 of 15] Compiling Stackage.Util    ( Stackage/Util.hs, dist/build/Stackage/Util.o )
[ 3 of 15] Compiling Stackage.Init    ( Stackage/Init.hs, dist/build/Stackage/Init.o )
[ 4 of 15] Compiling Stackage.Config  ( Stackage/Config.hs, dist/build/Stackage/Config.o )
[ 5 of 15] Compiling Stackage.LoadDatabase ( Stackage/LoadDatabase.hs, dist/build/Stackage/LoadDatabase.o )
[ 6 of 15] Compiling Stackage.HaskellPlatform ( Stackage/HaskellPlatform.hs, dist/build/Stackage/HaskellPlatform.o )
[ 7 of 15] Compiling Stackage.Tarballs ( Stackage/Tarballs.hs, dist/build/Stackage/Tarballs.o )
[ 8 of 15] Compiling Stackage.Test    ( Stackage/Test.hs, dist/build/Stackage/Test.o )
[ 9 of 15] Compiling Stackage.BuildPlan ( Stackage/BuildPlan.hs, dist/build/Stackage/BuildPlan.o )
[10 of 15] Compiling Stackage.NarrowDatabase ( Stackage/NarrowDatabase.hs, dist/build/Stackage/NarrowDatabase.o )
[11 of 15] Compiling Stackage.InstallInfo ( Stackage/InstallInfo.hs, dist/build/Stackage/InstallInfo.o )
[12 of 15] Compiling Stackage.CheckPlan ( Stackage/CheckPlan.hs, dist/build/Stackage/CheckPlan.o )
[13 of 15] Compiling Stackage.Select  ( Stackage/Select.hs, dist/build/Stackage/Select.o )
[14 of 15] Compiling Stackage.CheckCabalVersion ( Stackage/CheckCabalVersion.hs, dist/build/Stackage/CheckCabalVersion.o )
[15 of 15] Compiling Stackage.Build   ( Stackage/Build.hs, dist/build/Stackage/Build.o )
[ 1 of 15] Compiling Stackage.Types   ( Stackage/Types.hs, dist/build/Stackage/Types.p_o )
[ 2 of 15] Compiling Stackage.Util    ( Stackage/Util.hs, dist/build/Stackage/Util.p_o )
[ 3 of 15] Compiling Stackage.Init    ( Stackage/Init.hs, dist/build/Stackage/Init.p_o )
[ 4 of 15] Compiling Stackage.Config  ( Stackage/Config.hs, dist/build/Stackage/Config.p_o )
[ 5 of 15] Compiling Stackage.LoadDatabase ( Stackage/LoadDatabase.hs, dist/build/Stackage/LoadDatabase.p_o )
[ 6 of 15] Compiling Stackage.HaskellPlatform ( Stackage/HaskellPlatform.hs, dist/build/Stackage/HaskellPlatform.p_o )
[ 7 of 15] Compiling Stackage.Tarballs ( Stackage/Tarballs.hs, dist/build/Stackage/Tarballs.p_o )
[ 8 of 15] Compiling Stackage.Test    ( Stackage/Test.hs, dist/build/Stackage/Test.p_o )
[ 9 of 15] Compiling Stackage.BuildPlan ( Stackage/BuildPlan.hs, dist/build/Stackage/BuildPlan.p_o )
[10 of 15] Compiling Stackage.NarrowDatabase ( Stackage/NarrowDatabase.hs, dist/build/Stackage/NarrowDatabase.p_o )
[11 of 15] Compiling Stackage.InstallInfo ( Stackage/InstallInfo.hs, dist/build/Stackage/InstallInfo.p_o )
[12 of 15] Compiling Stackage.CheckPlan ( Stackage/CheckPlan.hs, dist/build/Stackage/CheckPlan.p_o )
[13 of 15] Compiling Stackage.Select  ( Stackage/Select.hs, dist/build/Stackage/Select.p_o )
[14 of 15] Compiling Stackage.CheckCabalVersion ( Stackage/CheckCabalVersion.hs, dist/build/Stackage/CheckCabalVersion.p_o )
[15 of 15] Compiling Stackage.Build   ( Stackage/Build.hs, dist/build/Stackage/Build.p_o )
Registering stackage-0.1.0.0...
Preprocessing executable 'stackage' for stackage-0.1.0.0...

on the commandline: Warning:
    -package-conf is deprecated: Use -package-db instead
[1 of 1] Compiling Main             ( app/stackage.hs, dist/build/stackage/stackage-tmp/Main.o )
Linking dist/build/stackage/stackage ...
> dist/build/stackage/stackage check
Checking build plan
cabal: ghc-pkg: global: openFile: does not exist (No such file or directory)
cabal returned a bad result, exiting
> dist/build/stackage/stackage build
Checking Cabal version
stackage: Unsupported Cabal version: 1.14.0
> sudo apt-get install cabal-install -t experimental
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Die folgenden Pakete werden aktualisiert (Upgrade):
  cabal-install
1 aktualisiert, 0 neu installiert, 0 zu entfernen und 598 nicht aktualisiert.
Es müssen noch 0 B von 2.017 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 174 kB Plattenplatz freigegeben.
Lese Changelogs...
(Lese Datenbank ... 307434 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Ersetzen von cabal-install 0.14.0-2 (durch .../cabal-install_1.16.0.2-1_amd64.deb) ...
Ersatz für cabal-install wird entpackt ...
cabal-install (1.16.0.2-1) wird eingerichtet ...
> dist/build/stackage/stackage check
Checking build plan
cabal: Could not resolve dependencies:
trying: crypto-api-0.10.2/installed-0b3...
rejecting: largeword-1.0.4 (conflict: crypto-api =>
largeword==1.0.3/installed-8a7...)
rejecting: largeword-1.0.3/installed-8a7..., 1.0.3, 1.0.2, 1.0.1, 1.0.0
(global constraint requires ==1.0.4)
Resolving dependencies...
cabal returned a bad result, exiting
> dist/build/stackage/stackage build
Checking Cabal version
Wiping out old sandbox folder
Creating new package database
Installing the following build tools: alex-3.0.2 happy-1.18.10
Build tools built
Build failed, please see build.log

@snoyberg
Copy link
Contributor

Sorry, I wasn't clear. It is checking the cabal binary, but checking which version of the Cabal library it was compiled against. The fact that stackage check fails with an older version of cabal-install is news to me, that looks like an unrelated bug I wasn't aware of. I'll update Stackage to check cabal versions in both cases and give a more meaningful error message.

snoyberg added a commit that referenced this issue Jan 27, 2013
@snoyberg
Copy link
Contributor

OK, updates pushed, what do you think?

@nomeata
Copy link
Contributor Author

nomeata commented Jan 27, 2013

Judging from looking at the code I’d say that this is fine.

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

2 participants