hie-bios takes **long** time when full path specified in hie.yaml #1735
Description
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 with
cradle:
stack:
the 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:
Could not load module 'Test.Hspec'
It is a member of the hidden package 'hspec-2.7.1'.
You can run ':set -package hspec' to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v (or `set -v` in ghci) to see a list of the files searched for. bios[2,1]
and the same message for Test.QuickCheck.
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?