Haskell-ide-engine: 9f9b68b build fails with 8.4.3 on mac OS 10.13.2: Could not find module ‘Language.Haskell.LSP.Types.Capabilities’

Created on 23 Jul 2018  Â·  12Comments  Â·  Source: haskell/haskell-ide-engine

stack install produces

hie-plugin-api-0.2.2.0: build (lib)
Log files have been written to: /Users/theUser/git/haskell-ide-engine/.stack-work/logs/
Progress 1/2

--  While building custom Setup.hs for package hie-plugin-api-0.2.2.0 using:
      /Users/theUser/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build lib:hie-plugin-api --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: /Users/theUser/git/haskell-ide-engine/.stack-work/logs/hie-plugin-api-0.2.2.0.log

    Preprocessing library for hie-plugin-api-0.2.2.0..
    Building library for hie-plugin-api-0.2.2.0..
    [ 4 of 11] Compiling Haskell.Ide.Engine.PluginsIdeMonads ( Haskell/Ide/Engine/PluginsIdeMonads.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Haskell/Ide/Engine/PluginsIdeMonads.o )

    /Users/theUser/git/haskell-ide-engine/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs:71:1: error:
        Could not find module ‘Language.Haskell.LSP.Types.Capabilities’
        Use -v to see a list of the files searched for.
       |
    71 | import           Language.Haskell.LSP.Types.Capabilities
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

A consecutive stack install haskell-lsp-types passed instantly without any output on stdout.

Any ideas?

Most helpful comment

The build & install succeeded. Thanks for your timely support!

All 12 comments

Have you updated your git submodules?

No. Did so:
git pull --recurse-submodules
git update

M   submodules/haskell-lsp
M   submodules/haskell-lsp-test
Your branch is up-to-date with 'origin/master'.

Yet the issue remains unchanged.

Can you try pulling from master again and seeing if it builds now?

git pull --recurse-submodules
git checkout

⨯ stack install                                                                                                                      21:46:03

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

In the dependencies for hie-plugin-api-0.2.2.0(+pedantic):
    haskell-lsp-0.3.0.0 from stack configuration does not match >=0.4.0.0  (latest matching version is 0.4.0.0)
needed since hie-plugin-api is a build target.

Some different approaches to resolving this:

  * Set 'allow-newer: true' to ignore all version constraints and build anyway.

  * 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.

  * Recommended action: try adding the following to your extra-deps in /Users/theUser/git/haskell-ide-engine/stack.yaml:

- haskell-lsp-0.4.0.0

Plan construction failed.
⨯ stack solver                                                                                                                       21:46:15
Using configuration file: stack.yaml
The following packages are missing from the config:
- submodules/HaRe/
- submodules/HaRe/hareview/
- submodules/HaRe/submodules/cabal-helper/
- submodules/HaRe/submodules/cabal-helper/hackage-metadata/
- submodules/HaRe/submodules/cabal-helper/tests/bkpregex/
- submodules/HaRe/submodules/cabal-helper/tests/exeintlib/
- submodules/HaRe/submodules/cabal-helper/tests/exelib/
- submodules/HaRe/submodules/cabal-helper/tests/fliblib/
- submodules/HaRe/submodules/ghc-mod/
- submodules/HaRe/submodules/ghc-mod/bench/data/simple-cabal/
- submodules/HaRe/submodules/ghc-mod/core/
- submodules/HaRe/submodules/ghc-mod/shelltest/browse/cabal/
- submodules/HaRe/submodules/ghc-mod/test/data/broken-cabal/
- submodules/HaRe/submodules/ghc-mod/test/data/broken-sandbox/
- submodules/HaRe/submodules/ghc-mod/test/data/cabal-flags/
- submodules/HaRe/submodules/ghc-mod/test/data/cabal-preprocessors/
- submodules/HaRe/submodules/ghc-mod/test/data/cabal-project/
- submodules/HaRe/submodules/ghc-mod/test/data/check-test-subdir/
- submodules/HaRe/submodules/ghc-mod/test/data/custom-cradle/
- submodules/HaRe/submodules/ghc-mod/test/data/duplicate-pkgver/
- submodules/HaRe/submodules/ghc-mod/test/data/ghc-mod-check/
- submodules/HaRe/submodules/ghc-mod/test/data/pattern-synonyms/
- submodules/HaRe/submodules/ghc-mod/test/data/stack-project/
- submodules/HaRe/submodules/ghc-mod/test/manual/not-interpreted-error/proj/
- submodules/HaRe/test/testdata/
- submodules/HaRe/test/testdata/cabal/cabal1/
- submodules/HaRe/test/testdata/cabal/cabal2/
- submodules/HaRe/test/testdata/cabal/cabal3/
- submodules/HaRe/test/testdata/cabal/cabal4/
- submodules/HaRe/test/testdata/cabal/foo/
- submodules/cabal-helper/
- submodules/cabal-helper/tests/bkpregex/
- submodules/cabal-helper/tests/exeintlib/
- submodules/cabal-helper/tests/exelib/
- submodules/cabal-helper/tests/fliblib/
- submodules/ghc-mod/
- submodules/ghc-mod/bench/data/simple-cabal/
- submodules/ghc-mod/core/
- submodules/ghc-mod/shelltest/browse/cabal/
- submodules/ghc-mod/test/data/broken-cabal/
- submodules/ghc-mod/test/data/broken-sandbox/
- submodules/ghc-mod/test/data/cabal-flags/
- submodules/ghc-mod/test/data/cabal-preprocessors/
- submodules/ghc-mod/test/data/cabal-project/
- submodules/ghc-mod/test/data/check-test-subdir/
- submodules/ghc-mod/test/data/custom-cradle/
- submodules/ghc-mod/test/data/duplicate-pkgver/
- submodules/ghc-mod/test/data/ghc-mod-check/
- submodules/ghc-mod/test/data/pattern-synonyms/
- submodules/ghc-mod/test/data/stack-project/
- submodules/ghc-mod/test/manual/not-interpreted-error/proj/
- submodules/haskell-lsp-test/
- submodules/haskell-lsp/
- submodules/haskell-lsp/haskell-lsp-types/
- submodules/yi-rope/
- test/testdata/
- test/testdata/addPackageTest/cabal/
- test/testdata/addPackageTest/hpack/
- test/testdata/gototest/
- test/testdata/redundantImportTest/

Using cabal packages:
- ./
- hie-plugin-api/

Using resolver: nightly-2018-07-09

Warning: Installed version of cabal-install (2.2.0.0) is newer than stack has been tested with.  If you run into difficulties, consider downgrading.

Using compiler: ghc-8.4.3
Asking cabal to calculate a build plan...
Trying with packages from nightly-2018-07-09 and 16 external packages as hard constraints...
Warning: cannot determine version of /usr/bin/strip :
""
Warning: Constraint refers to an unknown package: ghc-mod-core ==5.9.0.0 (main
config
/private/var/folders/mx/v5148n45119165d54fyd736r0000gp/T/cabal-solver98213/cabal.config)
CallStack (from HasCallStack):
  die', called at ./Distribution/Client/Install.hs:238:21 in cabal-install-2.2.0.0-IHp6spAFccOJflaXrhg91F:Distribution.Client.Install
cabal: Could not resolve dependencies:
[__0] trying: haskell-ide-engine-0.2.2.0 (user goal)
[__1] rejecting: haskell-ide-engine:!test (constraint from config file,
command line flag, or user target requires opposite flag selection)
[__1] trying: haskell-ide-engine:*test
[__2] unknown package: haskell-lsp-test (dependency of haskell-ide-engine
*test)
[__1] fail (backjumping, conflict set: haskell-ide-engine, haskell-lsp-test,
haskell-ide-engine:test)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: haskell-ide-engine (3),
haskell-ide-engine:test (3), haskell-lsp-test (1)

Could not parse cabal-install errors:

>>>> Cabal errors begin
<<<< Cabal errors end

CallStack (from HasCallStack):
  error, called at src/Stack/Solver.hs:130:25 in stack-1.7.1-4hH7bQGMWpYJJyBJYAX6mz:Stack.Solver

Can you try deleting .stack-work? I'm not sure why stack is trying to use the stackage version of haskell-lsp when we provide it as an extra-dep in stack.yaml.

And also maybe manually checking that submodules/haskell-lsp/haskell-lsp.cabal has version 0.4.0.0

it has version 0.3.0.0; should I change it?

It should be 0.4.0.0, but I have a feeling git pull --recurse-submodules isn't doing what it should be doing, maybe try git submodule update?

After git submodule update it is 0.4.0.04

Give stack install another try now then

It takes its time. Will report the result eventually.

The build & install succeeded. Thanks for your timely support!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

flip111 picture flip111  Â·  4Comments

rvion picture rvion  Â·  3Comments

alanz picture alanz  Â·  3Comments

wpoosanguansit picture wpoosanguansit  Â·  3Comments

xgrommx picture xgrommx  Â·  4Comments