From 9cbe0fdc79753a729e51469842fe212bc2e3dfe0 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Tue, 29 Mar 2022 12:21:09 -0400 Subject: [PATCH] Fix `cabal install` commands for local HLS build 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) --- docs/troubleshooting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 073c897534..68642dada1 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -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`: