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

Build does not complete - floskell, ormolu, hlint failures #1731

Closed
chexxor opened this issue Apr 10, 2020 · 7 comments
Closed

Build does not complete - floskell, ormolu, hlint failures #1731

chexxor opened this issue Apr 10, 2020 · 7 comments

Comments

@chexxor
Copy link

chexxor commented Apr 10, 2020

I got errors when building just now, too.

In Windows 10, I cloned this repo, then did stack install.

...
... (snip) ...
...
brittany          > Installing executable brittany in C:\sr\snapshots\0b20af29\bin
brittany          > Registering library for brittany-0.12.1.1..

--  While building package floskell-0.10.2 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.2.exe --builddir=.stack-work\dist\29cc6475 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1


--  While building package ormolu-0.0.3.1 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.2.exe --builddir=.stack-work\dist\29cc6475 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1


--  While building package hlint-2.2.11 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.2.exe --builddir=.stack-work\dist\29cc6475 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
Progress 8/14

Any ideas about what's going wrong here? I'm not an experienced Haskell developer.

@chexxor
Copy link
Author

chexxor commented Apr 10, 2020

It looks like the GHC version it's using is 8.8.2.

$ stack ghc -- --version
Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail
Stack has not been tested with Cabal versions above 2.4, but version 3.0.1.0 was found, this may fail
The Glorious Glasgow Haskell Compilation System, version 8.8.2

@chexxor
Copy link
Author

chexxor commented Apr 10, 2020

When I cloned, I did not add the submodule flag.

That is I did this: git clone https://github.com/haskell/haskell-ide-engine

Where the README says to do this: git clone https://github.com/haskell/haskell-ide-engine --recurse-submodules

Could this be part of the problem?

@chexxor
Copy link
Author

chexxor commented Apr 10, 2020

It looks like the current version of the .gitmodules file is empty, so maybe submodules are no longer used in the project?

https://github.com/haskell/haskell-ide-engine/blob/6a12fb05da8c2ea9647b84a4289b0e77cd3643c1/.gitmodules

@fendor
Copy link
Collaborator

fendor commented Apr 10, 2020

Submodules are, indeed, no longer needed.

@chexxor
Copy link
Author

chexxor commented Apr 10, 2020

I got the build to work using these commands:

# Remove the git clone directory which had the failing build.
$ rm -rf hie

# Clone it again into C:\hie
$ git clone https://github.com/haskell/haskell-ide-engine --recurse-submodules hie 

$ cd hie
# Make another mistake because the build instructions say it uses shake, so I try to reverse the command.
$ stack install shake
$ stack purge # I also deleted the exe from my local bin directory
$ rm -rf .stack-work/
$ stack install

# Maybe I cancelled that previous one? Because I ran this one 
$ stack ./install.hs hie

After that last command, I got a success.

...
... (snip) ...
...
haskell-ide-engine               > Registering library 'hie-test-utils' for haskell-ide-engine-1.3..
Completed 229 action(s).
Copying from C:\hie\.stack-work\install\38e963dd\bin\hie.exe to C:\Users\Alex\AppData\Roaming\local\bin\hie.exe
Copying from C:\hie\.stack-work\install\38e963dd\bin\hie-wrapper.exe to C:\Users\Alex\AppData\Roaming\local\bin\hie-wrapper.exe

Copied executables to C:\Users\Alex\AppData\Roaming\local\bin:
- hie.exe
- hie-wrapper.exe
# stack (for hie-8.6.5)
stty: 'standard input': Inappropriate ioctl for device
Build completed in 33m41s

@chexxor
Copy link
Author

chexxor commented Apr 10, 2020

No longer an issue! User error!

I'll submit a PR to clarify the README.

@jneira
Copy link
Member

jneira commented Apr 10, 2020

Glad to see the issue is resolved.

The key is to use stack install.hs hie, it runs the install script that uses the latest ghc version that works with windows (ghc-8.6.5) to installing hie. At the core it does a stack install --stack-yaml stack-8.6.5.yaml (among other necessary things, so i would suggest use it by default to install hie)

stack install uses the default stack.yaml config file, that makes it use ghc-8.8.2 and i am afraid it cant be used in windows due a compiler bug.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants