Skip to content

Campaign: canonical module-qualified identity for every declaration (name-resolution B) #751

Open

Description

@ehartford

Filed per D29 (docs/decisions.md) — record, don't start. Sequenced after the #747 str flip unless Eric re-orders.

Scope (from the ruling, verbatim)

canonical module-qualified identity for every declaration, carried through impl attachment, trait resolution/coherence, generic instantiation, MIR, comptime, all backends, and the migrator — no short-name re-resolution after initial lookup, anywhere.

Why

The flat merged namespace resolves names by short spelling, so a user declaration that shares a name with a type std itself uses cannot be given a second meaning (#750: string.w's StringBuilder is used by traits.w's Display impls — dropping/rebinding the name is usage-emergent breakage). D29's destination design (implicit std availability as a lowest-priority exact-match fallback tier, spec §18.2) requires that every declaration carry its canonical module identity from initial lookup onward; this campaign is that foundation.

Definition of done

  • Every declaration has one canonical module-qualified identity assigned at initial lookup.
  • That identity is what flows through impl attachment, trait resolution/coherence, generic instantiation, MIR, comptime, every backend, and the migrator.
  • No compiler phase re-resolves a short name after initial lookup — grep-provable absence, plus an analyze audit if one fits.
  • The A user Option/Result displaces std's generic templates in the compiler's own lookups #750 probes hold: type Regex { r: i32 } resolves to the user's type; impl Copy for CString attaches to the user's type; the string.w module-drop probe no longer rebinds Display impls.

Sequencing

Blocked behind #747 (str flip) per D29. The D activation issue is blocked on this one.

Activity

  1. ehartford commented on Oct 25, 2026

    @ehartford
    ContributorAuthor

    Triage 2026-10-25, with v0.15.3.0 (main a261b65): still open. Short-name resolution still crosses module identity: a user type Option = i32 changes what <embedded-std>/std/regex.w resolves (see #750's repro).

    post-release: the D29 campaign itself.

  2. added a commit that references this issue on Oct 28, 2026
  3. added this to the post-v0.16.0 milestone on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions