-
Notifications
You must be signed in to change notification settings - Fork 206
HIE doesn't work with 'simple' yesod project #1207
Comments
EDIT: I am leaving the below comment as it is, but please note that the way how I compiled hie to use profiling did not really work well. See #1214 for how to compile hie properly with profiling support.I have removed everything and restarted from scratch (and did not patch GHC again). As the problems still persist, I've tried to build hie with profiling enabled. Using the stack install --stack-yaml stack-8.6.4.yaml --work-dir .stack-work-profile --library-profiling --force-dirty
stack install --stack-yaml stack-8.6.4.yaml --work-dir .stack-work-profile --executable-profiling I switched to a custom hie wrapper script which runs hie like Using the VSCode plugin with a new project created via The first problem was that dynamic libraries could not be loaded. The error was:
Please note the ending of that file name I have absolutely no idea why it's that way. And I don't know why hie works with the simple stack project. So I simply went to Now I do not get the problem with the dynamic libraries anymore, but for the yesod project hie still fails with this error:
Any ideas what to try next? (Filing a GHC bug doesn't seem to be a good option for now ...) |
@skress Is the project public? It is possible this is a GHC bug though. |
It is not a 'project' at all. All I did was to create a new yesod project from an existing template:
That project gets created with lts-12.26 with a rather old ghc which has at least two bugs which prevents |
Thanks for the detailed bug report. Sorry that HIE didn't work for you so far. Someone will look into this issue and try to reproduce it. It would be good to isolate whether this only happens on OSX for example. |
I could reproduce it on NixOS, it didnt work either, so doesnt seem like OSX related problem. |
Just to pipe in with a "Me too!": At first I thought the problem was with SublimeText, the LSP package and the Windows implementation of pipes. I tried hie-8.6.4 under Linux on VirtualBox, same problem. It seems to take about three or four JSON RPCs before hie-8.6.4 craps out. It's almost as if hie's LSP's basic loop calls Python's This particular problem showed up about two weeks ago, and I've been trying to diagnose it when I can free cycles. |
@bscottm Can you open a new issue please? It isn't clear to me that your problem is related to this at all. In my experience errors such as
mean that the GHC that HIE was built with and version of GHC which build the shared object is different in some way. The one case I have seen this in particular is if you want to profile HIE you have to build it with a profiled version of GHC and then also have to build the project you want to load into HIE with profiling enabled. In this case, do you have profiling enabled in your project? I think creating symlinks and modifying the |
Can you also try building HIE so that the final executable is dynamically linked? |
I changed the way how to compile hie with profiling support (see #1214). Now I did not get any dylib problems like before, so it seems to have worked better. The net result is still the same, hie works with a simple These are the last lines of the VSCode output:
|
This is worrying. I'm not sure how we can debug this though. I will try to reproduce this on linux later this week. |
Not sure, but the last error mentions ghcmod and hie replaced it recently so maybe it could be fixed or at least the error will be different, @skress could you try with lastest master? |
Thanks for the ping. I've tried it the last couple of hours with different settings/configurations. I am using VS Code with the plugin in version 0.0.31 (latest published version). When I load the project the status bar stops at "Initializing Stack project: Settings.StaticFiles" and the logfile shows this error:
You can find the full log here: hie-2020-01-03.log HIE doesn't crash, but when hovering over anything in the editor I only get "Loading ..." and VSCode's status bar still shows "Initializing Stack project: Settings.StaticFiles". |
Thank you for testing it again and for the detailed report, i will try to reproduce |
I tried it on windows and it seems to work fine, so it could be macos specific. |
I can confirm that it also works for me on windows (tried it in a VM). On macOS I've tried the stack "servant" template and it works fine. When opening a .hs file in the servant project a temporary folder (e.g. For the yesod-simple project the error is |
Hi,
I am trying to use HIE with the current VSCode extension. HIE is started, then it dies after a couple of seconds. VSCode retries 5 times and then gives up.
The project is created via
I can run successfully run
stack build
in the project, but due to bugs in GHC and the chosen LTS I cannot runstack haddock
.So I updated to LTS 13.17 which uses GHC 8.6.4 and I cherry picked https://gitlab.haskell.org/ghc/ghc/merge_requests/276/commits which fixes the GHC bug that prevents haddock from running successfully. With my fixed GHC I can now run
stack haddock
andstack hoogle
. Nevertheless the result is the same: hie dies 5 times and then the extension doesn't try anymore.For completeness: when upgrading to LTS 13.17 I needed to upgrade a couple of the dependencies and I needed to add
haskell-src-exts-1.21.0@sha256:02421cacaa48c055551b8e5796efc543301b7ea9527a38e1385403d2b85512fb
as extra-dependency to the project's stack.yaml.This is the log output in VSCode:
This is part of the debug output of hie:
... and these are the last lines of the output:
The full hie.log can be seen here: https://gist.github.com/skress/d16c5a7e65086b86dee2170c4791e2d4
Using hie with a project generated via
stack new
i.e. not using any stack template seems to work.Any ideas what might cause this problem?
The text was updated successfully, but these errors were encountered: