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
{{ message }}
Repository navigation
Completion: include await M no longer adds M to the scope #8758
Found by differential semantic drift analysis from ece8b148 to a7721303.
What is broken
After include await M, completion no longer offers the values of M unqualified in the rest of the file.
analysis/src/completion_front_end.ml L755-L761 adds an include to the completion scope only when the included module is Pmod_ident or Pmod_apply (Pmod_ident _, _); every other module expression goes to | _ -> (). Since #8738 the parser represents await M as Pmod_await (Pmod_ident M) (res_core.ml), where it used to be Pmod_ident M with a res.await attribute. So include await M now hits the catch-all and Scope.add_include never runs. No file under analysis/src mentions Pmod_await.
This is a guess, not something established: #8738 changed the representation in the parser, compiler and printer, and editor analysis was not among the consumers updated, because its match on module expressions has a wildcard that keeps compiling when a constructor is added.
Activity
Fix issues from differential semantic drift analysis (rescript-lang#8768