-
Notifications
You must be signed in to change notification settings - Fork 206
HIE crashes if there is no "ghc" on the path with explicit stack config #1495
Comments
This is related to mpickering#60 and it should not happen at all. We want to support stack-only projects with no ghc on the path. |
@fendor I agree, but perhaps we should improve our error-reporting anyway, for those cases where this sort of thing does happen. It seems to me that the majority of errors reported from vscode relate to So turning a |
Absolutely. However, I dont know where this error is coming from, it should not be hie-bios. |
Found the problem and it is not pretty:
cc @mpickering |
Personally, I would prefer (1) but I am not sure that the architecture permits it, since we are starting the server before searching for the cradle. We could probably patch it, though. |
It seems to me that it would be good to have a dedicated part in the server startup to validate all runtime dependencies, including all executables and data files and report the result of them, as an alert error or as debug message if the validation passes. In this case, i think hie-bios should trigger lazily the searching of the cradle to get the ghc lib path and no assume it exist before that- (Not sure it it makes sense 😄) |
It makes sense, but the problem is, that the ghc-lib path is needed when the ghc thread is started, which happens when the server starts. |
What's the consensus on this? Should stack projects have an equivalent version of GHC installed globally? |
That is the work around, the pr #1496 fixes the issue. |
Use something like
showMessage
to report that GHC is not available, and suggest installing it, when starting hie.This would help in cases such as haskell/vscode-haskell#181
The text was updated successfully, but these errors were encountered: