Skip to content
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

HLS 2.5.0.0 generates Stan? related error #3885

Closed
Release-Candidate opened this issue Dec 2, 2023 · 9 comments · Fixed by #3894
Closed

HLS 2.5.0.0 generates Stan? related error #3885

Release-Candidate opened this issue Dec 2, 2023 · 9 comments · Fixed by #3894
Labels
can-workaround component: hls-stan-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@Release-Candidate
Copy link

Your environment

Which CPU do you use?

  • Apple ARM64 M1

Which OS do you use?

  • MacOS Sonoma 14.1.2

Which version of GHC do you use and how did you install it?

  • 9.6.3 ghcup (ARM64)

How is your project built (alternative: link to the project)?

  • Using stack.

Which LSP client (editor/plugin) do you use?

  • VS Code + Haskell

Which version of HLS do you use and how did you install it?

  • 2.5.0.0 ghcup (ARM64)

Have you configured HLS in any way (especially: a hie.yaml file)?

  • Does not work with or without an explicit hie.yaml - HLS 2.4.0.0 is working with the same hie.yaml.

Steps to reproduce

  • I don't know. Works with a "simple" project with 5 source files in total - 1x app, 2x lib 2x test - but not in two other, but still small, projects.

Expected behaviour

  • No errors are generated. Works when building manually and with HLS 2.4.0.0

Actual behaviour

Some Haskell source files - not all in the same subdirectory and not all files of a subdirectory - generate a HLS error.

Debug information

  • Error message:
nodeInfo
CallStack (from HasCallStack):
  error, called at src/Relude/Debug.hs:296:11 in rld-1.2.1.0-ae82aff6:Relude.Debug
  error, called at src/Stan/Hie/Compat904.hs:56:24 in stn-0.1.0.2-d29f6af7:Stan.Hie.Compat904

I do not see any indication of errors in the "Output" pane of "Haskell" in VS Code.

@Release-Candidate Release-Candidate added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Dec 2, 2023
@fendor
Copy link
Collaborator

fendor commented Dec 2, 2023

Hi, thank you for your bug report!

Pinging @0rphee as the maintainer of the stan plugin.

@fendor
Copy link
Collaborator

fendor commented Dec 2, 2023

I can reproduce on the HLS codebase itself.

I will make a release for VSCode so that you can disable the stan plugin and silence this error.

@Release-Candidate
Copy link
Author

Thank you very much, that spares me from the work of generating a minimal project to reproduce the error

@fendor
Copy link
Collaborator

fendor commented Dec 2, 2023

The latest vscode-haskell 2.4.2 should disable the stan plugin by default. Can you give it a try?

@Release-Candidate
Copy link
Author

Yes, thanks, it is working now.

And as soon as I enable Stan in the extension's config, the error appears.

@fendor
Copy link
Collaborator

fendor commented Dec 2, 2023

Keeping this open since this is a real issue we have to fix, but we have a work around :)

@0rphee
Copy link
Collaborator

0rphee commented Dec 2, 2023

This is an issue with the stan compatibility layer for =<9.4.
I'm very busy right now, but next week I will take a look.

@0rphee
Copy link
Collaborator

0rphee commented Dec 9, 2023

I can reproduce on the HLS codebase itself.

I will make a release for VSCode so that you can disable the stan plugin and silence this error.

@fendor do you happen to remember on which file, or component/package you used it? I cannot reproduce.

@fendor
Copy link
Collaborator

fendor commented Dec 9, 2023

@0rphee Make sure to enable the plugin in vscode, and then ghcide/.../Session.hs triggered the error at the very top after some time.

tomjaguarpaw added a commit to tomjaguarpaw/stan that referenced this issue Dec 10, 2023
There seem to be some cases in which SourceInfo doesn't exist, and
those led to run time crashes.

See, for example

* kowainik#541
* haskell/haskell-language-server#3885

Fixes: kowainik#541
tomjaguarpaw added a commit to kowainik/stan that referenced this issue Dec 10, 2023
There seem to be some cases in which SourceInfo doesn't exist, and
those led to run time crashes.

See, for example

* #541
* haskell/haskell-language-server#3885

Fixes: #541
0rphee added a commit to 0rphee/haskell-language-server that referenced this issue Dec 11, 2023
0rphee added a commit to 0rphee/haskell-language-server that referenced this issue Dec 12, 2023
michaelpj added a commit that referenced this issue Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can-workaround component: hls-stan-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants