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

Problem with hie-wrapper in windows related with location of cabal-helper-wrapper #1166

Closed
jneira opened this issue Apr 8, 2019 · 3 comments

Comments

@jneira
Copy link
Member

jneira commented Apr 8, 2019

Hi,

  • when running hie-wrapper in a cabal based project, i've got this output:
PS D:\dev\ws\haskell\cabal-test> hie-wrapper -d
2019-04-08 06:30:47.6085931 [ThreadId 3] - run entered for hie-wrapper(hie-wrapper.exe) Version 0.7.0.0 (2497 commits) x86_64 ghc-8.6.4
2019-04-08 06:30:47.6325875 [ThreadId 3] - Current directory:D:\dev\ws\haskell\cabal-test
hie-wrapper.exe: Could not find $libexecdir/cabal-helper-wrapper

If you are a cabal-helper developer you can set the environment variable
`cabal_helper_libexecdir' to override $libexecdir[1]. The following will
work in the cabal-helper source tree:

    $ export cabal_helper_libexecdir=$PWD/dist/build/cabal-helper-wrapper

[1]: D:\dev\ws\haskell\haskell-ide-engine\.stack-work\install\f33caf5a\libexec\x86_64-windows-ghc-8.6.4\cabal-helper-0.9.0.0
D:\dev\ws\haskell\haskell-ide-engine\.stack-work\install\f33caf5a\libexec\x86_64-windows-ghc-8.6.4\cabal-helper-0.9.0.0\cabal-helper-wrapper.exe
junk\build\cabal-helper-wrapper\cabal-helper-wrapper
D:\dev\ws\haskell\haskell-ide-engine\.stack-work\install\f33caf5a\bin\cabal-helper-wrapper

If you don't know what I'm talking about something went wrong with your
installation. Please report this problem here:

    https://github.com/DanielG/cabal-helper/issues
  • When running it in a stack based project i've got:
2019-04-08 06:32:16.4865135 [ThreadId 3] - run entered for hie-wrapper(hie-wrapper.exe) Version 0.7.0.0 (2497 commits) x86_64 ghc-8.6.4
2019-04-08 06:32:16.5065097 [ThreadId 3] - Current directory:D:\dev\ws\haskell\stack-test
2019-04-08 06:32:20.9344611 [ThreadId 3] - Cradle directory:D:\dev\ws\haskell\stack-test
2019-04-08 06:32:20.9544579 [ThreadId 3] - Using stack GHC version
2019-04-08 06:32:21.7829755 [ThreadId 3] - Project GHC version:8.4.4
2019-04-08 06:32:21.7909774 [ThreadId 3] - hie exe candidates :["hie-8.4.4.exe","hie-8.4.exe","hie.exe"]
2019-04-08 06:32:21.8189699 [ThreadId 3] - found hie exe at:D:\bin\hie.exe
2019-04-08 06:32:21.8269592 [ThreadId 3] - args:["-d"]
2019-04-08 06:32:21.8349577 [ThreadId 3] - launching ....

haskell-lsp:Starting up server ...
  • When i open the stack project in vscode the lsp server seems to be completely irresponsive (so maybe it is related with haskell-lsp startup blocked #1133?)
  • The path to my cabal-helper-wrapper executable is D:\dev\ws\haskell\haskell-ide-engine\.stack-work\install\f33caf5a\bin instead D:\dev\ws\haskell\haskell-ide-engine\.stack-work\install\f33caf5a\libexec\x86_64-windows-ghc-8.6.4\cabal-helper-0.9.0.0 (in fact libexec doesnt exist) or D:\dev\ws\haskell\haskell-ide-engine\.stack-work\install\f33caf5a\bin\cabal-helper-wrapper (the executable itself is there but there is not a "dir" with that name 🤔 )
  • When i set the cabal_helper_libexecdir env var to the correct path (D:\dev\ws\haskell\haskell-ide-engine\.stack-work\install\f33caf5a\bin) as suggested the hie-wrapper error in cabal project is not there and both projects (cabal and stack) can be opened in vscode normally.
  • Tested in windows 10 and windows 7
@jneira
Copy link
Member Author

jneira commented Apr 8, 2019

Well, it seems the code is testing the file existence in the bin dir without the exe extension: https://github.com/alanz/cabal-helper/blob/8fecf6a7754424ed1653dce632382707e8f03499/lib/Distribution/Helper.hs#L519-L520
I think i could make a pr and test it in my windows system

@jneira
Copy link
Member Author

jneira commented Apr 8, 2019

pr tested in windows 7: alanz/cabal-helper#5

@jneira
Copy link
Member Author

jneira commented May 3, 2019

Maybe we could close this one cause the fix is merged: 01807e6

@Anrock Anrock closed this as completed May 3, 2019
@alanz alanz added this to the prehistory milestone Jul 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants