vscode-haskell
vscode-haskell copied to clipboard
`ghcup --no-verbose upgrade` exited with exit code 1
Your environment
Which OS do you use: macOS (Monterey 12.3.1, Intel)
ghcup
is installed using brew
. I have run brew update && brew upgrade ghcup
:
$ brew update && brew upgrade ghcup
$ ghcup --version
The GHCup Haskell installer, version 0.1.17.7
Steps to reproduce
- The new release of the extension prompted me to ask whether I want to use
ghcup
to manage HLS installation; I accepted - The extension then runs
ghcup --no-verbose upgrade
which fails becauseupgrade
is not a commend recognised byghcup
Expected behaviour
- There should be no failure and the extension should be able to install/manage HLS successfully
Actual behaviour
-
ghcup
fails because of the unrecognised command - The extension shows an error popup in VSCode and does not proceed
Include debug information
Extension log:
2022-04-29 09:48:39.0530000 [client] INFO Executing 'ghcup --no-verbose upgrade' in cwd '/Users/mbg/Tweag/Hachi/hachi-api' 2022-04-29 09:48:39.1930000 [client] ERROR Error executing 'ghcup --no-verbose upgrade' with error code 1 2022-04-29 09:48:39.1930000 [client] ERROR stderr: Invalid argument `upgrade'
Usage: ghcup [(-v|--verbose) | --no-verbose] [(-c|--cache) | --no-cache] [--verify | (-n|--no-verify)] [(-o|--offline) | --no-offline] [--gpg <strict|lax|none>] COMMAND
Available options: -v,--verbose Enable verbosity (default: disabled) -c,--cache Cache downloads in ~/.ghcup/cache (default: disabled) -n,--no-verify Disable tarball checksum verification (default: enabled) --keep <always|errors|never> Keep build directories? (default: errors) --downloader <curl|wget> Downloader to use (default: curl) -o,--offline Don't do any network calls, trying cached assets and failing if missing. --gpg <strict|lax|none> GPG verification (default: none) -h,--help Show this help text --version Show version --numeric-version Show the numeric version (for use in scripts)
Main commands: tui Start the interactive GHCup UI install Install or update GHC/cabal/HLS/stack set Set currently active GHC/cabal version unset Unset currently active GHC/cabal version rm Remove a GHC/cabal/HLS/stack version list Show available GHCs and other tools compile Compile a tool from source whereis Find a tools location prefetch Prefetch assets gc Garbage collection run Run a command with the given tool in PATH
Other commands: debug-info Show debug info tool-requirements Show the requirements for ghc/cabal changelog Find/show changelog config Show or set config
Nuclear Commands: nuke Completely remove ghcup from your system
Discussion: ghcup installs the Glasgow Haskell Compiler from the official release channels, enabling you to easily switch between different versions. It maintains a self-contained ~/.ghcup directory.
ENV variables:
- TMPDIR: where ghcup does the work (unpacking, building, ...)
- GHCUP_INSTALL_BASE_PREFIX: the base of ghcup (default: $HOME)
- GHCUP_USE_XDG_DIRS: set to anything to use XDG style directories
Report bugs at https://gitlab.haskell.org/haskell/ghcup-hs/issues
2022-04-29 09:48:39.1940000 [client] ERROR Internal Error: ghcup --no-verbose upgrade
exited with exit code 1.
Consult the Extensions Output
for details.
2022-04-29 09:48:39.1950000 [client] ERROR Error: ghcup --no-verbose upgrade
exited with exit code 1.
Consult the Extensions Output
for details.
at /Users/mbg/.vscode/extensions/haskell.haskell-2.2.0/dist/extension.js:1:433058
at ChildProcess.exithandler (node:child_process:413:5)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Socket.
Oh dear... true. The brew version of ghcup disables ghcup upgrade
(a compile-time feature I added specifically for them). Oops.
As a workaround, set haskell.upgradeGHCup: false
in your settings.
GHCup tickets:
- https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/305
- https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/355
GHCup now re-enabled upgrade
functionality. https://github.com/Homebrew/homebrew-core/blob/master/Formula/ghcup.rb is still not updated, though.
Problem should be "fixed"? You are welcome to re-open if still a problem.
As a workaround, set
haskell.upgradeGHCup: false
in your settings.
Where and how to set this setting?
Hi! You can go to the Settings > Extensions > Haskell : Upgrade GHCup
and untick the option.