Open andrewufrank opened 3 years ago
Hi, thanks for the bug report and agree the error message could be improved. However cabal can fail for several different reasons (and not always its error messages are too good)
I expect a reasonable error message
It would be helpful to know some approximation to the message you would expect.
Perhaps something
When HLS works, it is really helpful.
I think it would be a general improvement showing the error message produced by CradleLoadResult
as it at least contains the command that failed and users could just execute it themselves for seeing the original error.
yeah, we could even add the suggestion, with the cli invocation if possible
Perhaps something along the lines:
Including the CradleLoadResult
might be helpful for users to understand somewhat more what goes on behind the scence.
When HLS works, it is really helpful.
I see the error failed to parse...
now with some regularity whenever I move files from a subdir in src
(i.e. moving from one library to another one) or change the filenames. Details of the error message seem to include the 'old' names, which I take as indication that some cache is not updated/invalidated in such cases.
Hope this help!
I could only get rid of the error message with restarting the vscode - I would guess that vscode keeps somewhere inodes (which are still valid after moving a file or deleting=moving to trash).
I got the same problem, the error message is scary even if it only means “local library depndency target didn’t compile”.
It will happen during normal development, basically any time you open Main.hs
while you changed something in the Lib.hs
and it doesn’t yet compile.
It will also stay around indefinitely, even after fixing Lib.hs
errors.
I get in
Problems
the messagefailed to parse result of calling cabal
which is hinting an internal problem. The cause was most mundane: the library in the project did not compile and in consequence the executable could not compile - strange enough, the other executable did not produce any error.Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:Which OS do you use: debian bullseye AMD64
Which lsp-client do you use: vs code
Describe your project (alternative: link to the project):
two executables, a library,
Steps to reproduce
I am not certain that this can be reproduced - I have not seen it in other similar cases.
Expected behaviour
I expect a reasonable error message
Actual behaviour
The message 'failed ..' persists even after the code compile ok. It disappeared after I run the executable.
If this is more than a fluke I can probably give more information and try to reproduce.