Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Cannot do cabal 3.0 build for 8.6.5 #1250

Closed
jarcane opened this issue May 8, 2019 · 16 comments · Fixed by #1379
Closed

Cannot do cabal 3.0 build for 8.6.5 #1250

jarcane opened this issue May 8, 2019 · 16 comments · Fixed by #1379
Labels
build Continuous integration and building good first issue os: linux os: windows

Comments

@jarcane
Copy link

jarcane commented May 8, 2019

Trying to install cabal-hie-8.6.5 gives me the following error instead:

Warning: Failed to build documentation for haddock-api-2.22.0 (which is
required by test:wrapper-test from haskell-ide-engine-0.9.0.0, test:unit-test
from haskell-ide-engine-0.9.0.0 and others).
# stack (for cabal-hie-8.6.5)
# cabal (for cabal-hie-8.6.5)
cabal: unrecognized 'new-install' option
`--symlink-bindir=/home/annaia/.local/bin'
Error when running Shake build system:
  at src/Development/Shake/Internal/Args.hs:81:69-79:
* Depends on: cabal-hie-8.6.5
* Raised the exception:
user error (Development.Shake.command_, system command failed
Command: cabal new-install --write-ghc-environment-files=never --symlink-bindir=/home/annaia/.local/bin exe:hie --overwrite-policy=always
Exit code: 1
Stderr:
cabal: unrecognized 'new-install' option
`--symlink-bindir=/home/annaia/.local/bin'
)

I have ghc-8.6.5 and cabal 3.0 installed locally so I'm presuming this is because somehow the stack temp cabal isn't the right version?

Anyway to fix this or is there something I'm missing?

@nponeccop nponeccop added build Continuous integration and building os: linux labels May 8, 2019
@nponeccop
Copy link
Contributor

Apparently cabal 3 doesn't recognize the new-build option:

cabal: unrecognized 'new-install' option

This can be fixed by several means:

  • Installing the right cabal-install privately and using it in install.hs
  • Warning the user from install.hs that cabal-install is too new
  • Supporting cabal 3 builds

A short term solution is to put cabal-install 2.x into PATH. Note that projects built with cabal 3 won't work with HIE either, so there's no reason to trying to build it with cabal 3 because it will break later.

@nponeccop nponeccop changed the title Cannot do cabal build for 8.6.5 Cannot do cabal 3.0 build for 8.6.5 May 8, 2019
@lukel97
Copy link
Collaborator

lukel97 commented May 8, 2019

Does cabal 3.0 support cabal v2-build?

@fendor
Copy link
Collaborator

fendor commented May 8, 2019

Is that already the release that drops the old-style builds?
cc @power-fungus

@alanz
Copy link
Collaborator

alanz commented May 8, 2019

Has cabal 3.0 been released yet?

@nponeccop
Copy link
Contributor

Has cabal 3.0 been released yet?

No. However:

  • We do build against GHC-nightly
  • We'll need to support it when it's out
  • Having a version check is a good idea to prevent breakage. We do check stack for example.

@alanz
Copy link
Collaborator

alanz commented May 8, 2019

@nponeccop we build against stackage nightly, not ghc nightly.

And we have a number of dependencies, that are intricately tied to the environment. So I would not expect a new cabal to just work, without updates to cabal-helper and ghc-mod at the very least.

@nponeccop
Copy link
Contributor

@nponeccop we build against stackage nightly, not ghc nightly.
oh, my bad. I saw ghc-nightly in .circleci and thought it's against GHC HEAD built by someone else (which is not a bad idea)

@alanz
Copy link
Collaborator

alanz commented May 11, 2019

I think this should be closed, as wontfix?

@fendor
Copy link
Collaborator

fendor commented May 11, 2019

I think this should be addressed soonish. Would be the fix to just use cabal v2-build, to ensure backwards and forwards compatibility?

@mpickering
Copy link
Collaborator

I think using v2-build is an easy way to fix this?

@fendor
Copy link
Collaborator

fendor commented May 30, 2019

Actually, the problem seems to be:

cabal: unrecognized 'new-install' option `--symlink-bindir=/home/annaia/.local/bin'

Which seems to be replaced by --installdir

@fendor
Copy link
Collaborator

fendor commented Sep 1, 2019

This problem is becoming more urgent. The fix, per se, is simple, just check for the version string, before using v2-install.
However, the question arises what version range we aim to support.

@jneira
Copy link
Member

jneira commented Sep 2, 2019

Note that cabal-install-3.0.0.0 had been shiped with --install-method=symlink by default and it seems it will be fixed with 3.0.0.1.
So maybe in windows we should explicitly set that flag if we want support 3.0.0.0.

@NickSeagull
Copy link

Perhaps this issue can be unpinned now?

@lukel97 lukel97 unpinned this issue Sep 4, 2019
@wilx
Copy link

wilx commented Nov 26, 2019

This is a real bummer. Can we get the 3.0.0.1 soon?

@jneira
Copy link
Member

jneira commented Nov 26, 2019

@wilx theinstall.hs script already support cabal-3.0.0.0, setting --install-method=copy auto for windows and --installdir path instead --symlink-bindir for all os's

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build Continuous integration and building good first issue os: linux os: windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants