Skip to content

Commit

Permalink
Fix cabal install commands for local HLS build (#2807)
Browse files Browse the repository at this point in the history
The existing command errors:

$ cabal install pkg:haskell-language-server
cabal: Internal error in target matching. It should always be possible to find
a syntax that's sufficiently qualified to give an unambiguous match. However
when matching 'pkg:haskell-language-server' we found haskell-language-server
(named-package) which does not have an unambiguous syntax. The possible syntax
and the targets they match are as follows:
'haskell-language-server' which matches haskell-language-server
(named-package)
'pkg:haskell-language-server' which matches haskell-language-server
(named-package), pkg:haskell-language-server (unknown-component),
:pkg:pkg:lib:pkg:file:haskell-language-server (unknown-file)
':pkg:haskell-language-server' which matches haskell-language-server
(named-package)

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
  • Loading branch information
9999years and pepeiborra authored Apr 4, 2022
1 parent dda3e5e commit f79967b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,13 @@ Dynamically linked binaries (including`ghci`) use the system linker instead of t
The easiest way to obtain a dynamically linked HLS binary is to build HLS locally. With `cabal` this can be done as follows:

```bash
cabal update && cabal install pkg:haskell-language-server
cabal update && cabal install :pkg:haskell-language-server
```

If you are compiling with a ghc version with a specific `cabal-ghc${ghcVersion}.project` in the repo you will have to use it. For example for ghc-9.0.x:

```bash
cabal update && cabal install pkg:haskell-language-server --project-file=cabal-ghc90.project
cabal update && cabal install :pkg:haskell-language-server --project-file=cabal-ghc90.project
```

Or with `stack`:
Expand Down

0 comments on commit f79967b

Please sign in to comment.