Skip to content

Completion: include await M no longer adds M to the scope #8758

Closed

Description

@cristianoc

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.

The form is accepted by the parser, e.g. tests/syntax_tests/data/ast-mapping/ModuleAwait.res. No analysis test covers completion after include await.

Possible cause (speculation only)

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

  1. added a commit that references this issue on Oct 12, 2026
    1c50add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions