Description
Subject of the issue
I encounter segfaults when attempting to run haskell-language-server-wrapper
in the root of my project (or from within my editor). They only go away when I remove this Template Haskell invocation.
I have tried removing the ~/.cache/ghcide
folder, ensuring there are no old haskell-language-server
binaries on my PATH, and adding a cabal.project
to the project. This happens with versions 0.4 and 0.5. I’m using the latest release of macOS.
EDIT: compiling haskell-language-server from source, passing in --enable-executable-dynamic
to configure
, appears to be a successful workaround.
Your environment
haskell-language-server version: 0.5.0.0 (GHC: 8.10.1) (PATH: /Users/patrickt/.ghcup/bin/haskell-language-server-wrapper-0.5.0) (GIT hash: 14497f2503a2a0d389fabf3b146d674b9af41a34)
Tool versions found on the $PATH
cabal: 3.4.0.0
stack: 2.3.1
ghc: 8.10.2
-
Which lsp-client do you use
Emacs (though this happens at the command line) -
Describe your project (alternative: link to the project)
https://github.com/patrickt/possession
Steps to reproduce
git clone https://github.com/patrickt/possession.git
cd possession
haskell-language-server-wrapper
Expected behaviour
Successful project compilation
Actual behaviour
fish: '/Users/patrickt/.ghcup/bin/hask…' terminated by signal SIGSEGV (Address boundary error)
Include debug information
Debug output:
haskell-language-server version: 0.5.0.0 (GHC: 8.10.2) (PATH: /Users/patrickt/.ghcup/bin/haskell-language-server-8.10.2~0.5.0) (GIT hash: 14497f2503a2a0d389fabf3b146d674b9af41a34)
(haskell-language-server)Ghcide setup tester in /Users/patrickt/src/possession.
Report bugs at https://github.com/haskell/haskell-language-server/issues
Tool versions found on the $PATH
cabal: 3.4.0.0
stack: 2.3.3
ghc: 8.10.2
Step 1/4: Finding files to test in /Users/patrickt/src/possession
Found 16 files
Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
Step 3/4: Initializing the IDE
Step 4/4: Type checking the files
[INFO] Consulting the cradle for "src/Game/Ecs.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/Users/patrickt/src/possession", cradleOptsProg = CradleAction: Cabal}
> Resolving dependencies...
> Build profile: -w ghc-8.10.2 -O0
> In order, the following will be built (use -v for more details):
> - possession-0.1.0.0 (lib) (configuration changed)
> Configuring library for possession-0.1.0.0..
> Preprocessing library for possession-0.1.0.0..
[INFO] Using interface files cache dir: /Users/patrickt/.cache/ghcide/possession-0.1.0.0-inplace-d45d56728bdc453e2db86899d6a423581f0b2ce7
[INFO] Making new HscEnv[possession-0.1.0.0-inplace]
[INFO] Consulting the cradle for "app/Main.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/Users/patrickt/src/possession", cradleOptsProg = CradleAction: Cabal}
fish: '/Users/patrickt/.ghcup/bin/hask…' terminated by signal SIGSEGV (Address boundary error)