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

hie-bios takes **long** time when full path specified in hie.yaml #1735

Closed
@mouse07410

Description

@mouse07410

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 ;):
Screen Shot 2020-04-13 at 09 38 29

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:
Screen Shot 2020-04-13 at 09 21 01

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions