Skip to content

Locate selective import and namespace binding errors at the import site #978

Closed

Description

@LunaStev

Problem

Module binding failures bypass preserved AST import spans. A missing/private selected symbol or conflicting namespace is reported at line 1, column 1 with a null span, even when the import appears later in the file.

Reproduction

Audited canonical master 42b65e426ad45bf896623b5bce814312b694a0c7 on Linux amd64 with Rust 1.89 and LLVM 21.1.8. Reproductions use the checkout-built target/debug/wavec and matching checkout std. The local head d2f58962 has an identical file tree to that canonical merge. Commands below assume WAVEC names that binary.

Create helper.wave:

pub fun exposed() -> i32 { return 1; }

Create main.wave:



import("./helper")::{absent};
fun main() {}
"$WAVEC" --error-format=json check main.wave

Observed: module './helper' has no symbol 'absent', line 1, column 1, span null. The import is on line 3. Qualified-use errors already retain expression spans; this failure occurs in bind_import before expression rewriting.

Scope

Carry existing import node/token provenance into binding diagnostics for missing/private selections and namespace conflicts/re-exports. Preserve module visibility, namespace rules and resolution order. Do not change #731's already fixed import grammar.

Starting points: src/module_resolver.rs, front/parser/src/source.rs.

Completion criteria

  • Selection errors identify the importing declaration and offending selection when available.
  • Namespace/re-export conflicts identify the conflicting import and useful prior location when available.
  • Native and imported-module human/JSON tests preserve existing resolution behavior.

Related: #731 covers malformed import syntax, not resolver binding failures; #451 covers unavailable target capabilities.

Activity

  1. self-assigned this
    on Oct 21, 2026
  2. added
    bug
    on Oct 21, 2026
  3. added a commit that references this issue on Oct 22, 2026
    aef39a5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions