Haskell-language-server: Doesn't build on Mac with Stack either

Created on 14 Jul 2020  Â·  4Comments  Â·  Source: haskell/haskell-language-server

MacOS Catalina 10.15.5, Xcode-11.5, GHC-8.10.1 and 8.8.3, stack-2.3.1 with resolver nightly-2020-07-13, Cabal-3.2.0.0.
Current haskell-language-server master.

$ stack ./install.hs hls-8.10.1 2>&1 | tee build-8.10.1-out.txt
. . . . .
shake                            > /private/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/stack-ebd23766ae05ecba/shake-0.19.1/src/Development/Shake/Internal/Core/Database.hs:93:14: warning: [-Wname-shadowing]
shake                            >     This binding for ‘is’ shadows the existing binding
shake                            >       bound at src/Development/Shake/Internal/Core/Database.hs:89:5
shake                            >    |
shake                            > 93 |             (is, i)<- pure $ Intern.add k is
shake                            >    |              ^^
ormolu                           >
ormolu                           > /private/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/stack-ebd23766ae05ecba/ormolu-0.1.2.0/<built-in>:15:10: error:
ormolu                           >      warning: non-portable path to file '".stack-work/dist/x86_64-osx/Cabal-3.2.0.0/build/Ormolu/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
ormolu                           > #include ".stack-work/dist/x86_64-osx/Cabal-3.2.0.0/build/ormolu/autogen/cabal_macros.h"
ormolu                           >          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ormolu                           >          ".stack-work/dist/x86_64-osx/Cabal-3.2.0.0/build/Ormolu/autogen/cabal_macros.h"
ormolu                           > 1 warning generated.
ormolu                           >
ormolu                           > /private/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/stack-ebd23766ae05ecba/ormolu-0.1.2.0/<built-in>:15:10: error:
ormolu                           >      warning: non-portable path to file '".stack-work/dist/x86_64-osx/Cabal-3.2.0.0/build/Ormolu/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
ormolu                           > #include ".stack-work/dist/x86_64-osx/Cabal-3.2.0.0/build/ormolu/autogen/cabal_macros.h"
ormolu                           >          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ormolu                           >          ".stack-work/dist/x86_64-osx/Cabal-3.2.0.0/build/Ormolu/autogen/cabal_macros.h"
. . . . .
haskell-language-server          > 517 | makeCompletions sps lf ideState params@(CompletionParams (TextDocumentIdentifier doc) pos _context _mt)
haskell-language-server          >     |                                 ^^^^^^
haskell-language-server          >
haskell-language-server          > /Users/ur20980/src/haskell-language-server/src/Ide/Plugin.hs:565:19: error: [-Wname-shadowing, -Werror=name-shadowing]
haskell-language-server          >     This binding for ‘uri’ shadows the existing binding
haskell-language-server          >       imported from ‘Language.Haskell.LSP.Types.Lens’ at src/Ide/Plugin.hs:46:1-90
haskell-language-server          >     |
haskell-language-server          > 565 | getPrefixAtPos lf uri pos = do
haskell-language-server          >     |                   ^^^

Warning: Failed to decode module interface:
         /Users/ur20980/src/haskell-language-server/.stack-work/dist/x86_64-osx/Cabal-3.2.0.0/build/Ide/Cradle.hi
         Decoding failure: Invalid magic: e49ceb0f
. . . . .
--  While building package haskell-language-server-0.2.0.0 using:
      /Users/ur20980/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_3.2.0.0_ghc-8.10.1 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.2.0.0 build lib:haskell-language-server exe:haskell-language-server exe:haskell-language-server-wrapper --ghc-options ""
    Process exited with code: ExitFailure 1

Complete build log build-8.10.1-out.txt

Here's failing stack build with GHC-8.8.3: build-8.8.3-out.txt

build needs repro bug

All 4 comments

Can not reproduce with stack 2.1.3.1, ghc 8.8.3 on NixOs.

nightly-2020-07-13

Why did you update the resolver?


Maybe perform a git pull, so you definitely have the latest changes?

Warning: Failed to decode module interface:
         /Users/ur20980/src/haskell-language-server/.stack-work/dist/x86_64-osx/Cabal-3.2.0.0/build/Ide/Cradle.hi
         Decoding failure: Invalid magic: e49ceb0f

Have you tried nuking .stack-work? Looks like something got corrupted

Can not reproduce with stack 2.1.3.1, ghc 8.8.3 on NixOs.

Current stack is 2.3.1:

$ stack --version
Version 2.3.1, Git revision de2a7b694f07de7e6cf17f8c92338c16286b2878 (8103 commits) x86_64 hpack-0.33.0

No idea how NixOs is similar to or different from MacOS or Linux.

Why did you update the resolver?

In hope that the new one brings fixes to something in the previous...?

Maybe perform a git pull, so you definitely have the latest changes?

I always do that before a new build, usually git pull --recurse-submodules, often followed by git submodule update --init --recursive just in case.

Have you tried nuking .stack-work? Looks like something got corrupted

I'm pretty sure I nuked .stack-work. But since I much prefer building with Cabal, and now (for reasons not understood but welcome ;) Cabal build succeeds for 8.8.3 and 8.10.1, I don't think I'll experiment with Stack anymore here.

Should be closed now - I've been building HLS on several Mac platforms with Cabal with no problem.

Was this page helpful?
0 / 5 - 0 ratings