-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
"Failed to parse result of calling cabal" on a M1 Mac #2691
Comments
Ready to film another video, and was hoping this would be fixed. I tried debugging a bit on my own to see if I could figure this out. When I run At this point, it would be really helpful if there were a way to get HLS to print out what subcommands it is executing. Then, I might be able to spot how its interaction with cabal is going wrong. As it is now, all I can see is the output, but I don't know the input that's creating it. :( |
You are probably mixing x86 and arm binaries. HLS (hie-bios really) invokes cabal, so make sure that both are the same arch |
Sorry, but I'm not sure what you mean: are you worried about the arch of HLS? or hie-bios? or of cabal? I can find the HLS binary according to the instructions in the VSCode Haskell extension (which installed it for me). What about the hie-bios binary? I don't see it. And how do I query their arches? Maybe this will provide an answer, though: does HLS use the cabal that's in the PATH? That is, when I execute cabal myself, it all works fine. But when HLS does, bad things happen. Could it be that HLS is invoking a different cabal than I am? That might explain what I am seeing. |
Ping. I keep making videos without HLS. I miss HLS and my viewers are starting to tell me to turn it on. But I can't! Help! :) |
@goldfirere I don't have an M1 Mac to test, so I cannot answer questions like "how do I check their arches". Please try to make sure that the |
@pepeiborra Thanks. I found https://stackoverflow.com/questions/1085137/how-do-i-determine-the-target-architecture-of-static-library-a-on-mac-os-x to help. (I had assumed I had to run e.g. Indeed Is it worth keeping this ticket open as an opportunity for a more informative error message? Specifically, when HLS hits the "failed to parse the result of cabal" error, it could likely check the arch of the HLS binary and the machine's arch, reporting a very helpful error if they mismatch. If this is, say, too specialized, then please feel free to close the ticket. |
I think this issue will be solved once we merge haskell/vscode-haskell#533 which installs the correct binaries based on the arch, afaict |
I've just hit this. It's strange because
(I'm on Linux) |
@tomjaguarpaw What you describe sounds like a very different problem (especially since you are on linux). Have these new modules been added to the cabal file? Until we have better integration with cabal files, there is a brief moment between creation and cabal modifications, where we try to load the module you have just added and there are not sensible cabal compiler options. In theory, when you wait, it should resolve by itself (but I think it is buggy). Restarting should always fix it, right? |
Oh, whoops, I forgot to add the new module to the cabal file. A few points:
|
Totally agree, but LSP has limited UX capabilities and cabal limited error reporting capability.
Because we internally invoke |
Thank you for the explanation, and thanks for your work on HLS. I love using it! |
I'm running into this also, but my modules are listed in the |
@isovector Good morning! Can you provide more logs? E.g. run |
Your environment
Which OS do you use: MacOS 12.2 on an M1 (aarch64) Mac.
Which LSP client (editor/plugin) do you use: VSCode
Describe your project (alternative: link to the project): https://github.com/goldfirere/video-resources/tree/main/2022-wordle
Steps to reproduce
I don't know how you can reproduce, but I can reliably reproduce the error by opening up a source file in my project in VSCode.
Expected behaviour
No error from the parsing the result of calling cabal.
Actual behaviour
I see this:
You can see this in action at https://youtu.be/C7-5y3sv_m4?t=527.
Include debug information
The log doesn't show me anything obviously interesting.
The text was updated successfully, but these errors were encountered: