haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 211 forks source link

stack --stack-yaml=stack-8.0.2.yaml install fails #470

Closed moodmosaic closed 5 years ago

moodmosaic commented 6 years ago
> ver
Microsoft Windows [Version 10.0.16299.192]

$ stack --version
Version 1.6.3, Git revision b27e629b8c4ce369e3b8273f04db193b060000db (5454 commits) x86_64 hpack-0.20.0

Executing

$ stack --stack-yaml=stack-8.0.2.yaml install

yields the following error:

Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading root
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading timestamp
Downloading snapshot
Downloading mirrors
Cannot update index (no local copy)
Downloading index
Updated package index downloaded
Update complete
Populated index cache.
Cloning e325975450ce89d790ed3f92de3ef675967d9538 from https://gitlab.com/alanz/HaRe.git
Cloning into 'C:\Users\Nikos\Downloads\haskell-ide-engine\.stack-work\downloaded\9zRr-Yb8IEfi'...
remote: Counting objects: 30531, done.
remote: Compressing objects: 100% (10432/10432), done.
remote: Total 30531 (delta 17739), reused 29758 (delta 17000)
Receiving objects: 100% (30531/30531), 43.29 MiB | 2.08 MiB/s, done.
Resolving deltas: 100% (17739/17739), done.
Checking out files: 100% (4239/4239), done.
Cloning 47e200a728a575f407ee6f9893d9a1e77b1b5325 from https://github.com/alanz/ghc-mod.git
Cloning into 'C:\Users\Nikos\Downloads\haskell-ide-engine\.stack-work\downloaded\PmPHKA28vAjA'...
remote: Counting objects: 14579, done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 14579 (delta 31), reused 42 (delta 21), pack-reused 14516
Receiving objects: 100% (14579/14579), 3.04 MiB | 1.56 MiB/s, done.
Resolving deltas: 100% (7739/7739), done.
Please ensure that commit 47e200a728a575f407ee6f9893d9a1e77b1b5325 exists within https://github.com/alanz/ghc-mod.git
Running C:\Program Files\Git\mingw64\bin\git.EXE --git-dir=.git reset --hard 47e200a728a575f407ee6f9893d9a1e77b1b5325 -- in directory C:\Users\Nikos\Downloads\haskell-ide-engine\.stack-work\downloaded\PmPHKA28vAjA\ exited with ExitFailure 128

error: unable to stat just-written file cabal.project: No such file or directory
error: unable to stat just-written file core/COPYING.AGPL3: No such file or directory
error: unable to stat just-written file core/COPYING.BSD3: No such file or directory
error: unable to stat just-written file core/GhcMod/ModuleLoader.hs: No such file or directory
error: unable to stat just-written file core/GhcModCore.hs: No such file or directory
error: unable to stat just-written file core/Setup.hs: No such file or directory
error: unable to stat just-written file core/ghc-mod-core.cabal: No such file or directory
warning: unable to unlink 'core/shared': Directory not empty
fatal: cannot create directory at 'core/shared': Directory not empty

Note that I've enabled Win32 long paths as per the instructions.

moodmosaic commented 6 years ago

Sebsequent runs of

stack --stack-yaml=stack-8.0.2.yaml

yield

$ stack --stack-yaml=stack-8.0.2.yaml install

Warning: Directory listed in .stack-work\downloaded\PmPHKA28vAjA\ghc-mod.cabal file does not exist:
         shared

Warning: Directory listed in .stack-work\downloaded\PmPHKA28vAjA\ghc-mod.cabal file does not exist:
         shared

Warning: Directory listed in .stack-work\downloaded\PmPHKA28vAjA\ghc-mod.cabal file does not exist:
         shared

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for ghc-mod-5.8.0.0:
    cabal-helper-0.8.0.2 from stack configuration does not match <0.8 && >=0.7.3.0 (latest matching
                         version is 0.7.3.0)
needed due to haskell-ide-engine-0.1.0.0 -> ghc-mod-5.8.0.0

Some potential ways to resolve this:

  * Recommended action: try adding the following to your extra-deps
    in C:\Users\Nikos\Downloads\haskell-ide-engine\stack-8.0.2.yaml:

- cabal-helper-0.7.3.0

  * Set 'allow-newer: true' to ignore all version constraints and build anyway.

  * You may also want to try using the 'stack solver' command.

Plan construction failed.
moodmosaic commented 6 years ago

Why do I get those �[0m, �[93m, and �[31m` remains another question. (I guess, because, Windows.)

mgsloan commented 6 years ago

There's some discussion of windows + ansi codes here -https://github.com/commercialhaskell/stack/issues/3797 .

moodmosaic commented 6 years ago

tl;dr, though 😕 What is the gist of it? (Thank you for pointing this out.)

MisLink commented 6 years ago

Got the same issue with default stack.yaml only on windows. I think the problem is Please ensure that commit 47e200a728a575f407ee6f9893d9a1e77b1b5325 exists within https://github.com/alanz/ghc-mod.git

Tehnix commented 6 years ago

Can anyone give a stab at building this on Windows again?

moodmosaic commented 6 years ago

@Tehnix, I may be able to do so. But what has changed meanwhile?

Tehnix commented 6 years ago

@moodmosaic updates to some of the dependencies, and bumped the resolver. Mainly just to get the ball rolling again on this issue :)

moodmosaic commented 6 years ago

@Tehnix I just did a stack build on the latest from master branch. Let's see 😃

moodmosaic commented 6 years ago

@Tehnix, I doesn't seem to work for me:

Nikos@DESKTOP-35RSAC9 MINGW64 ~/Downloads                                                                                                                                       
$ git clone https://github.com/haskell/haskell-ide-engine.git                                                                                                                   
Cloning into 'haskell-ide-engine'...                                                                                                                                            
remote: Counting objects: 9742, done.                                                                                                                                           
remote: Compressing objects: 100% (88/88), done.                                                                                                                                
remote: Total 9742 (delta 58), reused 149 (delta 50), pack-reused 9570                                                                                                          
Receiving objects: 100% (9742/9742), 2.78 MiB | 594.00 KiB/s, done.                                                                                                             
Resolving deltas: 100% (4529/4529), done.                                                                                                                                       

Nikos@DESKTOP-35RSAC9 MINGW64 ~/Downloads                                                                                                                                       
$ cd haskell-ide-engine/                                                                                                                                                        

Nikos@DESKTOP-35RSAC9 MINGW64 ~/Downloads/haskell-ide-engine (master)                                                                                                           
$ stack build                                                                                                                                                                   
Downloaded lts-11.2 build plan.                                                                                                                                                 
Didn't see ANum-0.2.0.2@sha256:c28c0a9779ba6e7c68b5bf9e395ea886563889bfa2c38583c69dd10aa283822e,1075 in your package indices.                                                   
Updating and trying again.                                                                                                                                                      
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/                                                                                                                
Downloading timestamp                                                                                                                                                           
Downloading snapshot                                                                                                                                                            
Updating index                                                                                                                                                                  
Updated package index downloaded                                                                                                                                                
Update complete                                                                                                                                                                 
Populated index cache.                                                                                                                                                          
Cloning e325975450ce89d790ed3f92de3ef675967d9538 from https://gitlab.com/alanz/HaRe.git                                                                                         
Cloning into 'C:\Users\Nikos\Downloads\haskell-ide-engine\.stack-work\downloaded\9zRr-Yb8IEfi'...                                                                               
remote: Counting objects: 30903, done.                                                                                                                                          
remote: Compressing objects: 100% (10557/10557), done.                                                                                                                          
remote: Total 30903 (delta 17987), reused 30101 (delta 17200)                                                                                                                   
Receiving objects: 100% (30903/30903), 43.34 MiB | 1.30 MiB/s, done.                                                                                                            
Resolving deltas: 100% (17987/17987), done.                                                                                                                                     
Checking out files: 100% (4239/4239), done.                                                                                                                                     
Cloning 47e200a728a575f407ee6f9893d9a1e77b1b5325 from https://github.com/alanz/ghc-mod.git                                                                                      
Cloning into 'C:\Users\Nikos\Downloads\haskell-ide-engine\.stack-work\downloaded\PmPHKA28vAjA'...                                                                               
remote: Counting objects: 14626, done.                                                                                                                                          
remote: Compressing objects: 100% (19/19), done.                                                                                                                                
remote: Total 14626 (delta 8), reused 9 (delta 5), pack-reused 14602                                                                                                            
Receiving objects: 100% (14626/14626), 3.04 MiB | 447.00 KiB/s, done.                                                                                                           
Resolving deltas: 100% (7778/7778), done.                                                                                                                                       
Please ensure that commit 47e200a728a575f407ee6f9893d9a1e77b1b5325 exists within https://github.com/alanz/ghc-mod.git                                                           
Running C:\Program Files\Git\mingw64\bin\git.EXE --git-dir=.git reset --hard 47e200a728a575f407ee6f9893d9a1e77b1b5325 -- in directory C:\Users\Nikos\Downloads\haskell-ide-engin
tack-work\downloaded\PmPHKA28vAjA\ exited with ExitFailure 128                                                                                                                  

error: unable to stat just-written file cabal.project: No such file or directory                                                                                                
error: unable to stat just-written file core/COPYING.AGPL3: No such file or directory                                                                                           
error: unable to stat just-written file core/COPYING.BSD3: No such file or directory                                                                                            
error: unable to stat just-written file core/GhcMod/ModuleLoader.hs: No such file or directory                                                                                  
error: unable to stat just-written file core/GhcModCore.hs: No such file or directory                                                                                           
error: unable to stat just-written file core/Setup.hs: No such file or directory                                                                                                
error: unable to stat just-written file core/ghc-mod-core.cabal: No such file or directory                                                                                      
warning: unable to unlink 'core/shared': Directory not empty                                                                                                                    
fatal: cannot create directory at 'core/shared': Directory not empty

I also did another stack build right after the failed one:

Nikos@DESKTOP-35RSAC9 MINGW64 ~/Downloads/haskell-ide-engine (master)
$ stack build

Warning: Directory listed in .stack-work\downloaded\PmPHKA28vAjA\ghc-mod.cabal file does not exist:
         shared

Warning: Directory listed in .stack-work\downloaded\PmPHKA28vAjA\ghc-mod.cabal file does not exist:
         shared

Warning: Directory listed in .stack-work\downloaded\PmPHKA28vAjA\ghc-mod.cabal file does not exist:
         shared

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for ghc-mod-5.8.0.0:
    Cabal-2.0.1.1 from stack configuration does not match >=1.18 && <1.25 (latest matching version
                  is 1.24.2.0)
    base-4.10.1.0 from stack configuration does not match >=4.6.0.1 && <4.10 (latest matching
                  version is 4.9.1.0)
    cabal-helper-0.8.0.2 from stack configuration does not match <0.8 && >=0.7.3.0 (latest matching
                         version is 0.7.3.0)
    extra-1.6.5 from stack configuration does not match <1.6 && >=1.4 (latest matching version
                is 1.5.3)
    ghc-8.2.2 from stack configuration does not match >=7.6 && <8.2
    haskell-src-exts-1.20.2 from stack configuration does not match <1.20 && >=1.18 (latest matching
                            version is 1.19.1)
    hlint-2.1.1 from stack configuration does not match <2.1 && >=2.0.8 (latest matching version
                is 2.0.15)
    monad-journal-0.8.1 from stack configuration does not match <0.8 && >=0.4 (latest matching
                        version is 0.7.2)
    optparse-applicative-0.14.2.0 from stack configuration does not match >=0.13.0.0 && <0.14
                                  (latest matching version is 0.13.2.0)
needed due to haskell-ide-engine-0.1.0.0 -> ghc-mod-5.8.0.0

Some potential ways to resolve this:

  * Recommended action: try adding the following to your extra-deps
    in C:\Users\Nikos\Downloads\haskell-ide-engine\stack.yaml:

- Cabal-1.24.2.0
- base-4.9.1.0
- cabal-helper-0.7.3.0
- extra-1.5.3
- haskell-src-exts-1.19.1
- hlint-2.0.15
- monad-journal-0.7.2
- optparse-applicative-0.13.2.0

  * Set 'allow-newer: true' to ignore all version constraints and build anyway.

  * You may also want to try using the 'stack solver' command.

Plan construction failed.

Nikos@DESKTOP-35RSAC9 MINGW64 ~/Downloads/haskell-ide-engine (master)
$

Here's the Stack version I'm using:

Nikos@DESKTOP-35RSAC9 MINGW64 ~/Downloads/haskell-ide-engine (master)                                       
$ stack --version                                                                                           
Version 1.6.3, Git revision b27e629b8c4ce369e3b8273f04db193b060000db (5454 commits) x86_64 hpack-0.20.0                                                                                                                
MisLink commented 6 years ago

I'm a beginner of haskell so I know nothing about how stack and HIE work. Here is my step:

  1. git clone & cd
    gjquo C:\Users\gjquo [00:38:21]
    $ stack --version
    Version 1.6.5, Git revision 24ab0d6ff07f28276e082c3ce74dfdeb1a2ca9e9 (5514 commits) x86_64 hpack-0.20.0
    gjquo C:\Users\gjquo [00:38:27]
    $ cd D:\code\haskell\
    gjquo D:\code\haskell [00:38:51]
    $ git clone https://github.com/haskell/haskell-ide-engine
    Cloning into 'haskell-ide-engine'...
    remote: Counting objects: 9742, done.
    remote: Compressing objects: 100% (88/88), done.
    remote: Total 9742 (delta 58), reused 149 (delta 50), pack-reused 9570
    Receiving objects: 100% (9742/9742), 2.78 MiB | 32.00 KiB/s, done.
    Resolving deltas: 100% (4529/4529), done.
    gjquo D:\code\haskell [00:40:30]
    $ cd .\haskell-ide-engine\
  2. stack install
    
    gjquo D:\code\haskell\haskell-ide-engine (master ●●●) [10:35:25]
    $ stack install
    Downloaded lts-11.2 build plan.
    Didn't see ChasingBottoms-1.3.1.4@sha256:1eaf893b068c70c6d7bfa98050fb803d3b253ac40998e692fa89066c0f76f451,6311 in your package indices.
    Updating and trying again.
    Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
    Downloading timestamp
    Downloading snapshot
    Updating index
    Updated package index downloaded
    Update complete
    Populated index cache.
    Cloning e325975450ce89d790ed3f92de3ef675967d9538 from https://gitlab.com/alanz/HaRe.git
    Cloning into 'D:\code\haskell\haskell-ide-engine\.stack-work\downloaded\9zRr-Yb8IEfi'...
    remote: Counting objects: 30903, done.
    remote: Compressing objects: 100% (10557/10557), done.
    remote: Total 30903 (delta 17987), reused 30101 (delta 17200)
    Receiving objects: 100% (30903/30903), 43.34 MiB | 2.79 MiB/s, done.
    Resolving deltas: 100% (17987/17987), done.
    Checking out files: 100% (4239/4239), done.
    Cloning 47e200a728a575f407ee6f9893d9a1e77b1b5325 from https://github.com/alanz/ghc-mod.git
    Cloning into 'D:\code\haskell\haskell-ide-engine\.stack-work\downloaded\PmPHKA28vAjA'...
    remote: Counting objects: 14626, done.
    remote: Compressing objects: 100% (19/19), done.
    remote: Total 14626 (delta 8), reused 9 (delta 5), pack-reused 14602 eceiving objects: 100% (14626/14626), 3.00 MiB | 20Receiving objec
    ts: 100% (14626/14626), 3.04 MiB | 138.00 KiB/s, done.
    Resolving deltas: 100% (7778/7778), done.
    Please ensure that commit 47e200a728a575f407ee6f9893d9a1e77b1b5325 exists within https://github.com/alanz/ghc-mod.git
    Running C:\Program Files\Git\cmd\git.EXE --git-dir=.git reset --hard 47e200a728a575f407ee6f9893d9a1e77b1b5325 -- in directory D:\code\haskell\haskell-ide-engine\.stack-work\downloaded\PmPHKA28vAjA\ exited with ExitFailure 128

error: unable to stat just-written file cabal.project: No such file or directory error: unable to stat just-written file core/COPYING.AGPL3: No such file or directory error: unable to stat just-written file core/COPYING.BSD3: No such file or directory error: unable to stat just-written file core/GhcMod/ModuleLoader.hs: No such file or directory error: unable to stat just-written file core/GhcModCore.hs: No such file or directory error: unable to stat just-written file core/Setup.hs: No such file or directory error: unable to stat just-written file core/ghc-mod-core.cabal: No such file or directory warning: unable to unlink 'core/shared': Directory not empty fatal: cannot create directory at 'core/shared': Directory not empty

3. then I try to execute `git reset` , first time it fail, and I try again:

gjquo D:\code\haskell\haskell-ide-engine (master ●●●) [10:39:19] $ cd ..stack-work\downloaded\PmPHKA28vAjA\ gjquo D:\code\haskell\haskell-ide-engine.stack-work\downloaded\PmPHKA28vAjA (master ●●●) [10:39:45] $ git --git-dir=.git reset --hard 47e200a728a575f407ee6f9893d9a1e77b1b5325 error: unable to stat just-written file core/shared/Utils.hs: No such file or directory error: unable to stat just-written file rundocker.sh: No such file or directory fatal: Could not reset index file to revision '47e200a728a575f407ee6f9893d9a1e77b1b5325'. gjquo D:\code\haskell\haskell-ide-engine.stack-work\downloaded\PmPHKA28vAjA (master ●●●) [10:39:57] $ git --git-dir=.git reset --hard 47e200a728a575f407ee6f9893d9a1e77b1b5325 HEAD is now at 47e200a Remove stale dependencies

4. then everything work.

gjquo D:\code\haskell\haskell-ide-engine (master ●●●) [10:40:05] $ stack install Diff-0.3.4: using precompiled package auto-update-0.1.4: using precompiled package base-compat-0.9.3: using precompiled package base-prelude-1.2.0.1: using precompiled package appar-0.1.4: using precompiled package base16-bytestring-0.1.1.6: using precompiled package base64-bytestring-1.0.0.1: using precompiled package basement-0.0.7: using precompiled package ...

alanz commented 5 years ago

Is this still a problem?

moodmosaic commented 5 years ago

Nope, so I would say let's close this.