Clarification on the "Check Project" option #3305
Replies: 2 comments
-
I think "load" is when the haskell extension for VSCode is loaded, which happens the first time you open a haskell file in the window. I assume that "project" means "entire library instead of just the specific files you have open and their dependencies within the same library", but I agree that that is confusing. I think (mostly speculation here) the issue with false error indications is because cabal treats libraries as atomic black boxes, so an entire library needs to be built before any libraries that depends on it can start building, which generally makes it difficult for an IDE to handle updates. |
Beta Was this translation helpful? Give feedback.
-
If it helps, the errors usually come in one of two flavors:
|
Beta Was this translation helpful? Give feedback.
-
I've always had the "Check Project" configuration flag ticked, but I cannot figure out what it is supposed to do.
I see (in the vscode output panel) no output whatsoever from the Haskell extension until I open a Haskell file. And even then, it appears to load lazily in a multi-package project; a package doesn't get loaded until I open one of the modules in that package.
This often leads to erroneous error indications. If package B depends on package A and I open only a module in package B, I will likely see a false compilation error. Opening a module from package A forces haskell-language server to load it, and the error disappears.
The upshot of all this is that every time I restart vscode, I have to go around clicking a module from every package in order to force the entire project to load. Is the "Check Project" option supposed to relieve the need to do this, or am I misunderstanding its meaning? Perhaps I am misunderstanding the meaning of the word "project"? (I have taken it to refer to a
cabal.project
file.) Perhaps I am also misunderstanding the word "load"? (I assumed it meant when VSCode started.)Beta Was this translation helpful? Give feedback.
All reactions