Coder Social home page Coder Social logo

Comments (7)

ianchanning avatar ianchanning commented on June 10, 2024 6

I'm running:

  • Fedora 29
  • GHC v8.4.4
  • Stack v1.9.3

I get the following error:

[ian@localhost ~]$ stack install ghc-mod
Writing implicit global project config file to: /home/ian/.stack/global-project/stack.yaml
Note: You can change the snapshot via the resolver field there.
Using latest snapshot resolver: lts-12.22
Downloaded lts-12.22 build plan.    
Preparing to install GHC (tinfo6) to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-tinfo6-8.4.4.                                      
Unpacking GHC into /home/ian/.stack/programs/x86_64-linux/ghc-tinfo6-8.4.4.temp/                                                                                Installed GHC.     
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc                                                                                Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc                                                                                Downloading root 
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc                                                                                Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc                                                                                Downloading timestamp
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc                                                                                Downloading snapshot
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc                                                                                Downloading mirrors
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc                                                                                Cannot update index (no local copy)
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc                                                                                Downloading index
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc                                                                                Updated package index downloaded
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc                                                                                Update complete  
Populated index cache.    

Error: While constructing the build plan, the following exceptions were
encountered:

In the dependencies for ghc-mod-5.8.0.0:
    Cabal-2.2.0.1 from stack configuration does not match >=1.18 && <1.25 
                  (latest matching version is 1.24.2.0)
    base-4.11.1.0 from stack configuration does not match >=4.6.0.1 && <4.10 
                  (latest matching version is 4.9.1.0)
    cabal-helper must match <0.8 && >=0.7.3.0, but the stack configuration has
                 no specified version  (latest matching version is 0.7.3.0)
    djinn-ghc must match <0.1 && >=0.0.2.2, but the stack configuration has no
              specified version  (latest matching version is 0.0.2.3)
    extra-1.6.13 from stack configuration does not match <1.6 && >=1.4  (latest
                 matching version is 1.5.3)
    ghc-8.4.4 from stack configuration does not match >=7.6 && <8.2 
    ghc-syb-utils must match <0.3 && >=0.2.3, but the stack configuration has no
                  specified version  (latest matching version is 0.2.3.3)
    haskell-src-exts-1.20.3 from stack configuration does not
                            match <1.20 && >=1.18  (latest matching version
                            is 1.19.1)
    hlint-2.1.11 from stack configuration does not match <2.1 && >=2.0.8 
                 (latest matching version is 2.0.15)
    monad-journal-0.8.1 from stack configuration does not match <0.8 && >=0.4 
                        (latest matching version is 0.7.2)
    optparse-applicative-0.14.3.0 from stack configuration does not
                                  match >=0.13.0.0 && <0.14  (latest matching
                                  version is 0.13.2.0)
    temporary-1.3 from stack configuration does not match <1.3 && >=1.2.0.3 
                  (latest matching version is 1.2.1.1)
needed since ghc-mod is a build target.

Some different approaches to resolving this:

  * Consider trying 'stack solver', which uses the cabal-install solver to
    attempt to find some working build configuration. This can be convenient
    when dealing with many complicated constraint errors, but results may be
    unpredictable.

  * Build requires unattainable version of base. Since base is a part of GHC,
    you most likely need to use a different GHC version with the matching base.

Plan construction failed.

from ghc-mod.

venantius avatar venantius commented on June 10, 2024 3

In the end I followed the advice in one of the other GitHub issues about GHC support and downgraded my resolver to lts-9.2.1 and that seems to have done the trick. It doesn't work with any more recent lts resolvers.

from ghc-mod.

DanielG avatar DanielG commented on June 10, 2024

At the moment time is a bit of a scarse resources around ghc-mod, it seems to have fallen out of stackage since lts-6 (i.e. GHC 7.10). Personally I don't use Stack and thus don't pay it much mind unless someone complains and sends patches :)

In principle ghc-mod should build with GHC 8.0.2 though so this is likely just a bounds issue. Maybe have a look at the Stackage Curator documentation if you want to help fixing this.

I'd be happy to execute any required metadata revisions on Hackage if you can figure out what needs fixing.

from ghc-mod.

AKurilin avatar AKurilin commented on June 10, 2024

Just to confirm, looks like ghc-mod is not buildable with stack in the last few LTS releases. I'd suggest removing mentions of stack for the time being, e.g. https://github.com/DanielG/ghc-mod/wiki/Installing#using-the-stack-tool can be confusing unless you know of this issue.

from ghc-mod.

xaviershay avatar xaviershay commented on June 10, 2024

I tried to understand the stackage curator thing but didn't get very far ... was confused that the only mention of ghc-mod in the stackage repo is in a config option to disable tests (#611), and unclear how I would verify "what is needed" to get it going.

Instead switched my .stack/global-project/stack.yaml to:

packages: []
resolver: "lts-9.21"

And now stack install ghc-mod works.

from ghc-mod.

xaviershay avatar xaviershay commented on June 10, 2024

DISCLAIMER: I am totally science-dogging this.

Aha I think I understand right now: we can't "add a temporary upper bound" in stackage for these packages, because they are super common packages (like base), and this upper bound has to apply for everything in stackage. So what I believe needs to happen is a new version of ghc-mod needs to be released that relaxes the upper bounds from the initial error message (this here from lts-11.22):

In the dependencies for ghc-mod-5.8.0.0:
    Cabal-2.0.1.1 from stack configuration does not match >=1.18 && <1.25  (latest matching version is 1.24.2.0)
    base-4.10.1.0 from stack configuration does not match >=4.6.0.1 && <4.10  (latest matching version is 4.9.1.0)
    cabal-helper must match <0.8 && >=0.7.3.0, but the stack configuration has no specified version  (latest matching version is 0.7.3.0)
    extra-1.6.9 from stack configuration does not match <1.6 && >=1.4  (latest matching version is 1.5.3)
    ghc-8.2.2 from stack configuration does not match >=7.6 && <8.2
    haskell-src-exts-1.20.2 from stack configuration does not match <1.20 && >=1.18  (latest matching version is 1.19.1)
    hlint-2.1.10 from stack configuration does not match <2.1 && >=2.0.8  (latest matching version is 2.0.15)
    monad-journal-0.8.1 from stack configuration does not match <0.8 && >=0.4  (latest matching version is 0.7.2)
    optparse-applicative-0.14.2.0 from stack configuration does not match >=0.13.0.0 && <0.14  (latest matching version is 0.13.2.0)

Those constraints are from ghc-mod-5.8.0.0 and some have already been addressed on master. From my reading of the current ghc-mod.cabal, this implies the following constraints need to be amended:

  • extra
  • haskell-src-exts
  • hlint
  • monad-journal
  • optparse-applicative

Further, cabal-helper is not in stackage anymore? It may need to be added?

from ghc-mod.

xaviershay avatar xaviershay commented on June 10, 2024

Ok there is definitely existing WIP that I believe would address this: #933 It currently seems stalled on the cabal-helper dep. There is discussion of that (maybe relevant?) in #900

from ghc-mod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.