You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
I was digging into this again and noticed that this is actually visible in the compiler with the below code:
The below code causes a NOT_FOUND error because of the use C. where C is an alias:
module Main
module A {
provide module B {
provide let b = 1
}
}
use A.{ module B as C }
use C.{ b }
I'm not sure why this doesn't affect our binding code or resolution elsewhere though, but it indicates things arn't quite as consistent. I think this might be because find_value goes through a completely different code path then find_module, and in the compiler I think we erase aliases when they are used on the module level in other places.
The following code causes the lsp to crash with a
Not_Found
:the issue seems to come from aliasing in the
module Bindings as A
the exception seems to be thrown from Sourcetree when we callfind_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 thedidOpen
event fires.The text was updated successfully, but these errors were encountered: