I'm trying to install HLS 1.7.0.0 but I'm getting the following error on a NixOS system:
$ /home/brian/code/x86_64-linux-ghcup-0.1.17.7 --no-verbose install hls 1.7.0.0[ Error ] (hls - 1.7.0.0 is already installed,[ ... ] The version 1.7.0.0 of the tool hls is not installed.)[ Error ] Also check the logs in /home/brian/.ghcup/logs
This seems like a big problem. It's already installed but not installed?
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
I haven't done anything in that directory manually and it's a normal directory, not a symlink.
$ find ~/.ghcup/home/brian/.ghcup/home/brian/.ghcup/cache/home/brian/.ghcup/cache/ghcup-0.0.7.yaml/home/brian/.ghcup/cache/ghcup-0.0.7.yaml.etags/home/brian/.ghcup/hls/home/brian/.ghcup/hls/1.7.0.0/home/brian/.ghcup/ghc/home/brian/.ghcup/trash/home/brian/.ghcup/bin/home/brian/.ghcup/logs/home/brian/.ghcup/logs/ghcup.log$ /home/brian/code/x86_64-linux-ghcup-0.1.17.7 debug-infoDebug Info==========GHCup base dir: /home/brian/.ghcupGHCup bin dir: /home/brian/.ghcup/binGHCup GHC directory: /home/brian/.ghcup/ghcGHCup cache directory: /home/brian/.ghcup/cacheArchitecture: x86_64Platform: Linux UnknownLinux, 21.11Version: v0.1.17.7$ cat /home/brian/.ghcup/logs/ghcup.log Debug: Identified Platform as: Linux UnknownLinux, 21.11Debug: last access was 125.222472512s ago, cache interval is 300sDebug: Decoding yaml at: /home/brian/.ghcup/cache/ghcup-0.0.7.yamlDebug: Requested to install hls version 1.7.0.0Debug: rm -f /home/brian/.ghcup/bin/haskell-language-server-wrapperError: (hls - 1.7.0.0 is already installed, The version 1.7.0.0 of the tool hls is not installed.)Error: Also check the logs in /home/brian/.ghcup/logs
Right. It seems this is a problem with cleanup on failure.
The directory /home/brian/.ghcup/hls/1.7.0.0 got created although installation failed. GHCup has very simplistic logic and uses certain internal directories to figure out if a tool is installed. For all other cases it deletes partial installation, but not for HLS, it appears.