Skip to content

Commit baa0cde

Browse files
committed
More troubleshooting
1 parent e81160d commit baa0cde

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,46 @@ Please include the output when filing any issues on the [haskell-language-server
233233
(f.e. `~/.profile`, but i can vary depending on your system setup).
234234
- See [this stackoverflow question](https://stackoverflow.com/questions/43983718/set-global-path-environment-variable-in-vs-code) for more tricks.
235235

236+
#### `Failed to get project GHC version` on darwin M1 with stack
237+
238+
If you have installed stack via the official cannels, the binary will not be M1 native, but x86 and trigger the rosetta compatibility layer. GHCup provides real stack/HLS M1 binaries, so make sure you install stack via GHCup. Also see https://github.com/haskell/haskell-language-server/issues/2864
239+
240+
#### `GHC ABIs don't match`
241+
242+
If you're running stack with GHC 9.0.2, you will get this because of an outdated
243+
GHC bindist that stack installs.
244+
245+
Force it to install the fixed bindist (that includes profiling libs) by adding this to your stack.yaml (depending on your platform):
246+
247+
```yml
248+
setup-info:
249+
ghc:
250+
linux64-tinfo6:
251+
9.0.2:
252+
url: "https://downloads.haskell.org/ghc/9.0.2/ghc-9.0.2a-x86_64-fedora27-linux.tar.xz"
253+
```
254+
255+
Alternatively let GHCup install the correct bindist and then set `system-ghc: true` in your `stack.yaml`.
256+
257+
Now make sure to remove cached/installed libraries to avoid getting segfaults at runtime.
258+
259+
If you hit this problem although you're not using stack or GHC 9.0.2, please report an issue. As a workaround, you can try to compile HLS from source (the extension should pick it up) via ghcup, see [https://haskell-language-server.readthedocs.io/en/stable/installation.html#ghcup](https://haskell-language-server.readthedocs.io/en/stable/installation.html#ghcup).
260+
261+
#### Something else doesn't work
262+
263+
If something just doesn't work, but you recall an old configuration that did, you
264+
may try forcing a particular setting, e.g. by disabling all automatic installations
265+
except HLS:
266+
267+
```json
268+
"haskell.toolchain": {
269+
"hls": "1.6.1.0",
270+
"ghc": null,
271+
"cabal": null,
272+
"stack": null
273+
}
274+
```
275+
236276
## Contributing
237277

238278
If you want to help, get started by reading [Contributing](https://github.com/haskell/vscode-haskell/blob/master/Contributing.md) for more details.

0 commit comments

Comments
 (0)