Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

auto install of cabal on windows is not working #1462

@flip111

Description

@flip111

i followed the documentation to install the data and latest ghc with install.sh and stack. After that vscode tries to run a command which fails. I just pasted this same command in a terminal and it looks like this:

C:\Users\flip111>C:\Users\flip111\haskell\haskell-ide-engine\.stack-work\install\4259daf8\bin\cabal-helper-wrapper.exe "--with-ghc=C:\\Users\\flip111\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.6.5\\bin\\ghc.exe" "--with-ghc-pkg=C:\\Users\\flip111\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.6.5\\bin\\ghc-pkg.exe" "--with-cabal=cabal" "v1-style" "C:\\Users\\flip111\\haskell\\pcre2" "C:\\Users\\flip111\\haskell\\pcre2\\.stack-work\\dist\\e626a42b" "package-db-stack" "flags" "compiler-version" "ghc-merged-pkg-options" "config-flags" "non-default-config-flags" "ghc-src-options" "ghc-pkg-options" "ghc-lang-options" "ghc-options" "source-dirs" "entrypoints" "needs-build-output"
cabal-helper-wrapper: Installing a private copy of Cabal because we couldn't
find the right version in your global/user package-db, this might take a
while but will only happen once per Cabal version you're using.

If anything goes horribly wrong just delete this directory and try again:
    C:\Users\flip111\Local Settings\Cache\cabal-helper

If you want to avoid this automatic installation altogether install
version 2.4.1.0 of Cabal manually (into your user or global package-db):
    $ cabal install Cabal --constraint "Cabal == 2.4.1.0"

Installing Cabal 2.4.1.0 ...
cabal-helper-wrapper.exe: Installing Cabal version 2.4.1.0 failed.

You have the following choices to fix this:

- The easiest way to try and fix this is just reconfigure the project and try
  again:
        $ cabal clean && cabal configure

- If that fails you can try to install the version of Cabal mentioned above
  into your global/user package-db somehow, you'll probably have to fix
  something otherwise it wouldn't have failed above:
        $ cabal install Cabal --constraint 'Cabal == 2.4.1.0'

- If you're using `Build-Type: Simple`:
  - You can see if you can reinstall your cabal-install executable while
    having it linked to a version of Cabal that's available in you
    package-dbs or can be built automatically:
        $ ghc-pkg list | grep Cabal  # find an available Cabal version
            Cabal-W.X.Y.Z
        $ cabal install cabal-install --constraint 'Cabal == W.X.*'
    Afterwards you'll have to reconfigure your project:
        $ cabal clean && cabal configure

- If you're using `Build-Type: Custom`:
  - Have cabal-install rebuild your Setup.hs executable with a version of the
    Cabal library that you have available in your global/user package-db:
        $ cabal clean && cabal configure
    You might also have to install some version of the Cabal to do this:
        $ cabal install Cabal

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions