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

Upgrading a library doesn't work #8337

Closed
yaxu opened this issue Aug 3, 2022 · 5 comments
Closed

Upgrading a library doesn't work #8337

yaxu opened this issue Aug 3, 2022 · 5 comments

Comments

@yaxu
Copy link

yaxu commented Aug 3, 2022

Trying to install a new version of a library causes a dependency error:

alex@toaster:~$ cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library 
alex@toaster:~$ cabal install tidal-1.7.10 --lib
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
 - base-orphans-0.8.6 (lib) (requires download & build)
 - blaze-builder-0.4.2.2 (lib) (requires download & build)
 - clock-0.8.3 (lib) (requires download & build)
 - colour-2.3.6 (lib) (requires download & build)
 - data-binary-ieee754-0.4.4 (lib:data-binary-ieee754) (requires download & build)
 - ghc-paths-0.1.0.12 (lib:ghc-paths) (requires download & build)
 - indexed-traversable-0.1.2 (lib) (requires download & build)
 - primitive-0.7.4.0 (lib) (requires download & build)
 - tagged-0.8.6.1 (lib) (requires download & build)
 - temporary-1.3 (lib) (requires download & build)
 - th-abstraction-0.4.4.0 (lib) (requires download & build)
 - transformers-compat-0.7.2 (lib) (requires download & build)
 - hashable-1.4.0.2 (lib) (requires download & build)
 - hosc-0.19.1 (lib) (requires download & build)
 - distributive-0.6.2.1 (lib) (requires download & build)
 - hint-0.9.0.6 (lib) (requires download & build)
 - async-2.2.4 (lib) (requires build)
 - comonad-5.0.8 (lib) (requires download & build)
 - bifunctors-5.5.12 (lib) (requires download & build)
 - tidal-1.7.10 (lib) (requires download & build)
 - tidal-1.7.10 (exe:tidal) (requires download & build)
Downloading  base-orphans-0.8.6
Downloaded   base-orphans-0.8.6
Downloading  clock-0.8.3
Starting     base-orphans-0.8.6 (lib)
Downloaded   clock-0.8.3
Downloading  colour-2.3.6
Starting     clock-0.8.3 (lib)
Downloaded   colour-2.3.6
Downloading  transformers-compat-0.7.2
Starting     colour-2.3.6 (lib)
Building     base-orphans-0.8.6 (lib)
Downloaded   transformers-compat-0.7.2
Downloading  data-binary-ieee754-0.4.4
Building     clock-0.8.3 (lib)
Downloaded   data-binary-ieee754-0.4.4
Downloading  th-abstraction-0.4.4.0
Building     colour-2.3.6 (lib)
Downloaded   th-abstraction-0.4.4.0
Downloading  primitive-0.7.4.0
Downloaded   primitive-0.7.4.0
Downloading  tagged-0.8.6.1
Downloaded   tagged-0.8.6.1
Downloading  distributive-0.6.2.1
Downloaded   distributive-0.6.2.1
Downloading  indexed-traversable-0.1.2
Downloaded   indexed-traversable-0.1.2
Downloading  comonad-5.0.8
Downloaded   comonad-5.0.8
Downloading  bifunctors-5.5.12
Downloaded   bifunctors-5.5.12
Downloading  temporary-1.3
Downloaded   temporary-1.3
Downloading  blaze-builder-0.4.2.2
Downloaded   blaze-builder-0.4.2.2
Downloading  hosc-0.19.1
Starting     blaze-builder-0.4.2.2 (lib)
Downloaded   hosc-0.19.1
Downloading  hashable-1.4.0.2
Downloaded   hashable-1.4.0.2
Downloading  tidal-1.7.10
Building     blaze-builder-0.4.2.2 (lib)
Downloaded   tidal-1.7.10
Downloading  ghc-paths-0.1.0.12
Installing   clock-0.8.3 (lib)
Downloaded   ghc-paths-0.1.0.12
Downloading  hint-0.9.0.6
Completed    clock-0.8.3 (lib)
Starting     data-binary-ieee754-0.4.4 (all, legacy fallback)
Downloaded   hint-0.9.0.6
Installing   base-orphans-0.8.6 (lib)
Building     data-binary-ieee754-0.4.4 (all, legacy fallback)
Completed    base-orphans-0.8.6 (lib)
Starting     ghc-paths-0.1.0.12 (all, legacy fallback)
Installing   data-binary-ieee754-0.4.4 (all, legacy fallback)
Completed    data-binary-ieee754-0.4.4 (all, legacy fallback)
Starting     indexed-traversable-0.1.2 (lib)
Installing   colour-2.3.6 (lib)
Completed    colour-2.3.6 (lib)
Starting     primitive-0.7.4.0 (lib)
Building     indexed-traversable-0.1.2 (lib)
Installing   blaze-builder-0.4.2.2 (lib)
Completed    blaze-builder-0.4.2.2 (lib)
Starting     tagged-0.8.6.1 (lib)
Building     primitive-0.7.4.0 (lib)
Building     ghc-paths-0.1.0.12 (all, legacy fallback)
Building     tagged-0.8.6.1 (lib)
Installing   ghc-paths-0.1.0.12 (all, legacy fallback)
Completed    ghc-paths-0.1.0.12 (all, legacy fallback)
Starting     temporary-1.3 (lib)
Installing   tagged-0.8.6.1 (lib)
Building     temporary-1.3 (lib)
Completed    tagged-0.8.6.1 (lib)
Starting     th-abstraction-0.4.4.0 (lib)
Building     th-abstraction-0.4.4.0 (lib)
Installing   temporary-1.3 (lib)
Installing   indexed-traversable-0.1.2 (lib)
Completed    temporary-1.3 (lib)
Starting     transformers-compat-0.7.2 (lib)
Completed    indexed-traversable-0.1.2 (lib)
Starting     hashable-1.4.0.2 (lib)
Building     transformers-compat-0.7.2 (lib)
Building     hashable-1.4.0.2 (lib)
Installing   transformers-compat-0.7.2 (lib)
Installing   hashable-1.4.0.2 (lib)
Completed    transformers-compat-0.7.2 (lib)
Starting     hosc-0.19.1 (lib)
Completed    hashable-1.4.0.2 (lib)
Starting     distributive-0.6.2.1 (lib)
Building     hosc-0.19.1 (lib)
Building     distributive-0.6.2.1 (lib)
Installing   th-abstraction-0.4.4.0 (lib)
Completed    th-abstraction-0.4.4.0 (lib)
Starting     hint-0.9.0.6 (lib)
Building     hint-0.9.0.6 (lib)
Installing   distributive-0.6.2.1 (lib)
Completed    distributive-0.6.2.1 (lib)
Starting     async-2.2.4 (lib)
Building     async-2.2.4 (lib)
Installing   primitive-0.7.4.0 (lib)
Completed    primitive-0.7.4.0 (lib)
Starting     comonad-5.0.8 (lib)
Building     comonad-5.0.8 (lib)
Installing   async-2.2.4 (lib)
Completed    async-2.2.4 (lib)
Installing   hosc-0.19.1 (lib)
Completed    hosc-0.19.1 (lib)
Installing   comonad-5.0.8 (lib)
Completed    comonad-5.0.8 (lib)
Starting     bifunctors-5.5.12 (lib)
Building     bifunctors-5.5.12 (lib)
Installing   hint-0.9.0.6 (lib)
Completed    hint-0.9.0.6 (lib)
Installing   bifunctors-5.5.12 (lib)
Completed    bifunctors-5.5.12 (lib)
Starting     tidal-1.7.10 (lib)
Building     tidal-1.7.10 (lib)
Installing   tidal-1.7.10 (lib)
Completed    tidal-1.7.10 (lib)
Starting     tidal-1.7.10 (exe:tidal)
Building     tidal-1.7.10 (exe:tidal)
Installing   tidal-1.7.10 (exe:tidal)
Completed    tidal-1.7.10 (exe:tidal)
alex@toaster:~$ ghci
GHCi, version 8.10.7: https://www.haskell.org/ghc/  :? for help
Loaded package environment from /home/alex/.ghc/x86_64-linux-8.10.7/environments/default
Prelude> import Sound.Tidal.Con
Sound.Tidal.Config   Sound.Tidal.Context  Sound.Tidal.Control
Prelude> import Sound.Tidal.Con
Sound.Tidal.Config   Sound.Tidal.Context  Sound.Tidal.Control
Prelude> import Sound.Tidal.Context 
Prelude Sound.Tidal.Context> 
Leaving GHCi.
alex@toaster:~$ cabal install tidal-1.8.0 --lib
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] next goal: tidal (user goal)
[__0] rejecting: tidal-1.8.0 (constraint from user target requires ==1.7.10)
[__0] rejecting: tidal-1.7.10, tidal-1.7.9, tidal-1.7.8, tidal-1.7.7,
tidal-1.7.6, tidal-1.7.5, tidal-1.7.4, tidal-1.7.3, tidal-1.7.2, tidal-1.7.1,
tidal-1.7, tidal-1.6.1, tidal-1.6.0, tidal-1.5.2, tidal-1.5.1, tidal-1.5.0,
tidal-1.4.9, tidal-1.4.8, tidal-1.4.7, tidal-1.4.6, tidal-1.4.5, tidal-1.4.4,
tidal-1.4.3, tidal-1.4.2, tidal-1.4.1, tidal-1.4.0, tidal-1.3.0, tidal-1.2.1,
tidal-1.2.0, tidal-1.1.2, tidal-1.1.1, tidal-1.1.0, tidal-1.0.14,
tidal-1.0.13, tidal-1.0.12, tidal-1.0.11, tidal-1.0.10, tidal-1.0.9,
tidal-1.0.8, tidal-1.0.7, tidal-1.0.6, tidal-1.0.5, tidal-1.0.4, tidal-1.0.3,
tidal-1.0.2, tidal-1.0.1, tidal-1.0.0, tidal-0.9.10, tidal-0.9.9, tidal-0.9.8,
tidal-0.9.7, tidal-0.9.6, tidal-0.9.5, tidal-0.9.4, tidal-0.9.3, tidal-0.9.2,
tidal-0.9.1, tidal-0.9, tidal-0.8.2, tidal-0.8.1, tidal-0.8, tidal-0.7.1,
tidal-0.7, tidal-0.6, tidal-0.5.3, tidal-0.5.2, tidal-0.5.1, tidal-0.5,
tidal-0.4.36, tidal-0.4.35, tidal-0.4.34, tidal-0.4.33, tidal-0.4.32,
tidal-0.4.31, tidal-0.4.30, tidal-0.4.29.1, tidal-0.4.29, tidal-0.4.28,
tidal-0.4.27, tidal-0.4.26, tidal-0.4.24, tidal-0.4.23, tidal-0.4.21,
tidal-0.4.20, tidal-0.4.19, tidal-0.4.17, tidal-0.4.16, tidal-0.4.15,
tidal-0.4.14, tidal-0.4.13, tidal-0.4.12, tidal-0.4.11, tidal-0.4.10,
tidal-0.4.9, tidal-0.4.8, tidal-0.4.7, tidal-0.4.6, tidal-0.4.5, tidal-0.4.4,
tidal-0.4.3, tidal-0.4.2, tidal-0.4.1, tidal-0.4, tidal-0.3.9, tidal-0.3.8,
tidal-0.3.7, tidal-0.3.6, tidal-0.3.5, tidal-0.3.4, tidal-0.3.3, tidal-0.3.2,
tidal-0.3.1, tidal-0.3, tidal-0.2.13, tidal-0.2.11, tidal-0.2.10, tidal-0.2.9,
tidal-0.2.7, tidal-0.2.6, tidal-0.2.4, tidal-0.2.3, tidal-0.2.2.8,
tidal-0.2.2.7, tidal-0.2.2.6, tidal-0.2.2, tidal-0.2.1, tidal-0.2,
tidal-0.1.0.1, tidal-0.1 (constraint from user target requires ==1.8.0)
[__0] fail (backjumping, conflict set: tidal)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: tidal
@yaxu yaxu changed the title Upgrading a library doesn' Upgrading a library doesn't work Aug 3, 2022
@yaxu
Copy link
Author

yaxu commented Aug 3, 2022

Ah I see this is a duplicate of the well articulated #7373 which is closed in favour of the more obscure (to me) #5559.

@fendor
Copy link
Collaborator

fendor commented Aug 3, 2022

Hi!

The workflow for cabal install --lib is somewhat lacking and you shouldn't use it in general, unless you take extra caution.

To unblock you immediately, you can take a look at ~/.ghc/x86_64-linux-8.10.7/environments/default and either remove the line that mentions or tidal, or delete that file entirely. The latter is probably the better approach.

@yaxu
Copy link
Author

yaxu commented Aug 3, 2022

Thanks @fendor, I'm a developer of the tidal package and familiar with workarounds that I've been helping people with since the switch to v2- commands some years ago. It would be great if there was a reliable way to install, use and upgrade a library with cabal that didn't require difficult workarounds.

@yaxu
Copy link
Author

yaxu commented Aug 3, 2022

Also a duplicate of #6394 and #6391! (apologies for the duplication, it's been a while..)

@jneira
Copy link
Member

jneira commented Aug 6, 2022

so let's closing it as duplicate, @yaxu don't worry and thanks for reporting your struggles with cabal v2 workflow

@jneira jneira closed this as completed Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants