-
-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If Project doesn't start in a buildable state HLS doesn't work until at least 1 successful build #2174
Comments
Hi, thanks for reporting the issue. It was a known one but no issue was tracking it (although #1757 is related).
The desired behaviour
would be tricky to accomplish with the actual design, i guess. hls needs a initial info (cradle) for loading the project and right now it needs to build the project to get it. Could you attach the logs of executing |
In fact #1812 is reporting the same problem, although reporter asked for a better error message which definitely is doable |
Very well may be tricky. But at the bare minimum there are tools that can report the compile errors of a project never built before, even if the full hie database hasn't been populated, being able to have the LSP communicate the "Problems" exactly as they were reported by ghc would be a significant improvement over the current state of affairs. This seems like it would be a much smaller lift than "make the whole thing work" |
I am not quite sure what 'break a project' means, do you mean compilation issues or project issues such as, |
Only compilation issues. I think it is safe to say that if stack.yaml is not parseable the only level of information that can be provided is where the parse error occurs in the stack.yaml. Anything else would be witchcraft. |
Hm, it surprises me a bit that this doesn't work. I would expect it to work for at least the component that is broken. |
This has been my experience on Linux and my colleague's on MacOS. Are you able to repro? |
Well, with hie-bios I at least get the compiler options if the library has a compilation issue, which should work then, afaict. |
Tested with HLS, if I have one compilation issue (like unknown identifier, or something like that) then HLS launches correctly and shows me the error if and only if the issue originates from the same component. So, it doesn't work if I open the test-suite but the library doesn't compile. |
And that is reported somewhere iirc |
Is this tested on 1.3 or on master? |
I think 1.3 |
The issue is #318, which is blocked upstream. |
I forgot there is also the error reporting improvement: i think the lib compilation error should be shown at least in the log, is that the case? |
I think there should be a |
I think it is sensible for dependent libraries to not build at all if dependency libraries won't build, so while not ideal from a UX perspective, I agree that theres only so much you can do. |
Reporting on behalf of Colleague
Your environment
MacOS, HLS 1.3.0
Which OS do you use:
MacOS
Which lsp-client do you use:
VSCode
Describe your project (alternative: link to the project):
stack + hpack
Contents of
hie.yaml
:Steps to reproduce
Expected behaviour
HLS should work as normal even if the first build fails
Actual behaviour
No error information will be reported into the editor until HLS can build the project successfully once
The text was updated successfully, but these errors were encountered: