-
Notifications
You must be signed in to change notification settings - Fork 233
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
Hover of a mutually recursive type can cause a stack overflow #1755
Comments
Thank for your report @Chaarlesss. Are you using merlin mode or an lsp mode ? Could it be that your "hover" query has a high verbosity by default ? |
I am using merlin mode (with merlin-eldoc). To clarify, I found this error in the log's buffer and does not appear when the problem occurs. I guess the freeze may come from my own configuration of Emacs (which is roughly Doom Emacs with the OCaml module), but I think that the underlying problem may come from Merlin. I also tried to reproduce this in VSCode (standard setup with OCamlPlatform), and I also get a strange result (but I am not sure Merlin the one in cause here): |
Looking into eglot, it does seems that there is a verbosity setting that can be Verbosity was not meant to be always set on max and it can lead to strange issues with recursive types. While setting verbosity to min might be a workaround I agree that the behavior of Merlin is not satisfying here, it would be worth to have a look. |
Changing the verbosity fixed indeed the freezing. Thanks for pointing me to this solution ! |
The stack overflows are not happening anymore. However the env at the cursor position is too limited to answer the query accurately.
The stack overflows are not happening anymore. However the env at the cursor position is too limited to answer the query accurately.
Hi,
Merlin produces a stack overflow which causes Emacs to freeze when hovering the type
b
on line 1 of the following code:Strangely, the problem does not occur when hovering the type
a
on line 2.I am using Merlin 4.14-501 with OCaml 5.1.1.
The end of the stack trace is:
The text was updated successfully, but these errors were encountered: