-
Notifications
You must be signed in to change notification settings - Fork 206
hie-bios takes **long** time when full path specified in hie.yaml #1735
Comments
Ping...? |
Hi, maybe comparing the hie log between implicit stack cradle ( |
Could you please point me at where I can find that log? And whether I need to set anything to have that log produced/recorded? |
If you use vcode f.e. the output of stderr and stdout is displayed in the output pane, you will have to open the hs file before Usually we will need set the verbose mode, changing the vscode option:
You also can inform the file where do you want to log:
and the stdout will be writen there (stderr will continue present in the vscode pane) |
First, I think it's really bad that HIE crashes if the specified log file doesn't exist, instead of just creating it!
Second - shouldn't it respect VSCode variables convention as specified in https://code.visualstudio.com/docs/editor/variables-reference ? Now, despite setting trace to the above log file is empty, and the Output window shows nothing that I could make sense of:
The above is with the "explicit" Here's what's happening when I reduce it to cradle:
cabal:
|
Mmmm i think your settings are not being applied, concretely
It should do it, maybe it worths open an issue in the vscode extension project: https://github.com/alanz/vscode-hie-server/issues And it seems it is using "off" as trace option, instead "verbose". The log in the output panel is the one you got if you set "off". It is quite strange, i am not aware that those options had not been applied correctly until now. I cant reproduce it in windows. Does it happen if you set project vs user settings? |
After I saw the HIE server crashing with that setting, I switched to
How? |
Oh no, I don't. |
OK, I found config error on my end (somehow, Liquid got enabled?!), and logging became better. For # target examples https://cabal.readthedocs.io/en/latest/cabal-commands.html#cabal-v2-build
cradle:
cabal:
- path: "./"
component: "lib:Str2Split"
- path: "./test/"
component: "test:Str2Split-test"
- path: "./app/"
component: "exe:Str2Split-exe"
For # target examples https://cabal.readthedocs.io/en/latest/cabal-commands.html#cabal-v2-build
cradle:
cabal:
Hope it can point you at the problem(s). |
Ping...? |
Hi, i've been taking a look to both logs, i'll reproduce the relevant part of the slow init:
It takes 13 seconds but we have to take in account:
|
I don't understand - why does it perform the whole build??? All it seems to need is parsing??? Also, I did not request Also, consider that this is a very small toy project - I shudder to think what the delay/time lag would be for a real-size project. |
Well, hie relies in Not sure which component triggered the The |
I'm afraid I don't understand. I observe this insane delay every time I (re-)open a file, without restarting VS Code, let alone anything else. I don't think Hackage index could possibly change between the two consecutive requests to open the same file.
This delay is very consistent, and does not seem to depend on whatever could be cached (or maybe it refuses to cache...?)...
Let's try it??? |
Hi, forget what i wrote about I see in the logs you was using hie-1.3, has you switched to the newer version 1.4? |
Wow! I concur - with the latest hie v1.4 I did not observe this problem. Thank you!! |
MacOS Catalina 10.15.4, Xcode-11.4, Cabal-3.2.0.0 (Hackage, not GitHub repo), Stack-2.1.3, current VSCode, current Haskell Language Server (from VSCode marketplace), current master of HIE.
I got a problem.
With the workaround proposed in #1727, my project https://github.com/mouse07410/Str2Split.git works, and does not show false errors (unless you count the

hlint
insistence on re-doing$ do
;):However, whenever I open the .hs files from this project, it takes a long (compared to, e.g., how it used to be with Stack) time. I see "Initializing Cabal project" status message on the bottom bar of VSCode window, and after half a minute or so that message disappears, and the project is ready. This re-initialization repeats for every .hs file I open. And if I close a file and re-open it again, it again re-initializes, with the following:

If I switch this project to Stack and replace
hie.yaml
content withthe performance returns (i.e., initialization when the project is opened is reasonably fast, and there is no re-initialization as I open and close .hs files). I suspect performance would return if I do the same with Cabal in
hie.yaml
. But now I'm getting two errors regarding Hspec framework:If I create an analog of the workaround from #1727 for Stack (see
hie.yaml-stack
in the project), the above error disappears, but performance drops significantly - like with Cabal.In case it matters - the problems started after I added Hspec to the
test/Spec.hs
. Before that I did not seem to even need the #1727 workaround.Is there a workaround or fix for this quite annoying delay problem?
The text was updated successfully, but these errors were encountered: