You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
with cabal 3.0 , cabal install can't install new versions of a package on ghc 8.8.1
To Reproduce
cabal --version
cabal-install version 3.0.0.0
compiled using version 3.0.0.0 of the Cabal library
bash-3.2$ cabal install directory
cabal install directory
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: directory-1.3.4.0 (user goal)
[__1] next goal: ghc (user goal)
[__1] rejecting: ghc-8.8.1/installed-8.8... (conflict: directory==1.3.4.0, ghc
=> directory==1.3.3.2/installed-1.3...)
[__1] rejecting: ghc-8.6.5, ghc-8.6.4, ghc-8.6.1, ghc-8.4.4, ghc-8.4.3,
ghc-8.4.1, ghc-8.2.2, ghc-8.2.1 (constraint from user target requires ==8.8.1)
[__1] fail (backjumping, conflict set: directory, ghc)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: directory, ghc
Desired behavior
That this work as it did in cabal 2
System information
mac os 10.14.6
cabal --version
cabal-install version 3.0.0.0
compiled using version 3.0.0.0 of the Cabal library
ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.1
Additional context
This was first reported as a directory package issue: haskell/directory#98 butI believe it is a generic issue. The response there was:
I believe this caused by the difference in behavior between cabal v1-install and cabal v2-install. You are currently using v2-install, which installs to a package environment file such as ~/.ghc/${arch}-${os}/environments/default. In that environment file (which you can inspect with a text editor), directory-1.3.3.2 is probably already installed, so you cannot install a different version.
To work around this, you can try to install to a new environment, say ./foobar.env:
cabal v2-install --lib --package-env=./foobar.env directory-1.3.4.0
...
There is some bit of documentation in the Cabal user guide on the new changes but I do agree it is quite confusing and the migration path is not adequately explained. It did take me some time to figure out what was causing the issue your described.
I do suggest posting your feedback on the Cabal project itself, not here, as I'm not sure whether the maintainers of Cabal would see this thread.
The text was updated successfully, but these errors were encountered:
Describe the bug
with cabal 3.0 , cabal install can't install new versions of a package on ghc 8.8.1
To Reproduce
cabal --version
cabal-install version 3.0.0.0
compiled using version 3.0.0.0 of the Cabal library
bash-3.2$ cabal install directory
cabal install directory
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: directory-1.3.4.0 (user goal)
[__1] next goal: ghc (user goal)
[__1] rejecting: ghc-8.8.1/installed-8.8... (conflict: directory==1.3.4.0, ghc
=> directory==1.3.3.2/installed-1.3...)
[__1] rejecting: ghc-8.6.5, ghc-8.6.4, ghc-8.6.1, ghc-8.4.4, ghc-8.4.3,
ghc-8.4.1, ghc-8.2.2, ghc-8.2.1 (constraint from user target requires ==8.8.1)
[__1] fail (backjumping, conflict set: directory, ghc)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: directory, ghc
Desired behavior
That this work as it did in cabal 2
System information
mac os 10.14.6
cabal --version
cabal-install version 3.0.0.0
compiled using version 3.0.0.0 of the Cabal library
ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.1
Additional context
This was first reported as a directory package issue: haskell/directory#98 butI believe it is a generic issue. The response there was:
I believe this caused by the difference in behavior between cabal v1-install and cabal v2-install. You are currently using v2-install, which installs to a package environment file such as ~/.ghc/${arch}-${os}/environments/default. In that environment file (which you can inspect with a text editor), directory-1.3.3.2 is probably already installed, so you cannot install a different version.
To work around this, you can try to install to a new environment, say ./foobar.env:
cabal v2-install --lib --package-env=./foobar.env directory-1.3.4.0
...
There is some bit of documentation in the Cabal user guide on the new changes but I do agree it is quite confusing and the migration path is not adequately explained. It did take me some time to figure out what was causing the issue your described.
I do suggest posting your feedback on the Cabal project itself, not here, as I'm not sure whether the maintainers of Cabal would see this thread.
The text was updated successfully, but these errors were encountered: