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

LSP: Crash when aliasing a module #2179

Open
spotandjake opened this issue Oct 23, 2024 · 1 comment
Open

LSP: Crash when aliasing a module #2179

spotandjake opened this issue Oct 23, 2024 · 1 comment
Labels
bug lsp Issues related to the language server.

Comments

@spotandjake
Copy link
Member

spotandjake commented Oct 23, 2024

The following code causes the lsp to crash with a Not_Found:

from "./host.gr" include Host
use Host.{ module Bindings as A }
print(A.add(1ul, 2ul))

the issue seems to come from aliasing in the module Bindings as A the exception seems to be thrown from Sourcetree when we call find_module, we could fix this by just adding a try catch and not including the item in sourcetree but that just hides the bug and I think this is indicative of a deeper problem. This exception happens when the didOpen event fires.

@spotandjake spotandjake added bug lsp Issues related to the language server. labels Oct 23, 2024
@spotandjake
Copy link
Member Author

After investigating this a little I think the problem here is actually in find_module comparing to find_name if we do not find the given ident in the IdTbl we then check the alias table before declaring it not found this logic does not currently exist in the find_module function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug lsp Issues related to the language server.
Projects
None yet
Development

No branches or pull requests

1 participant