Skip to content

fix(sv): validate module and interface names without interface ports #1497

Closed

Description

@tignear

Follow-up to the review of #1468. Deferred to a separate issue at the user's request; #1474 does not cover this finding.

Review: #1468 (comment)

When a source contains both interface I and module I, but interfaces are used only as local instances, package setup can skip the shared namespace check. ParsedSource::analyze_packages_impl invokes plan_interfaces only if an InterfacePortHeader exists; its earlier insertion detects duplicate interfaces only. A declaration may consequently be published as a module while I i() is bound as the interface.

Code inspection at f3b6a2423e128d588afabf85c6c42806439435dd: the guard is in crates/celox-sv-analyzer/src/parsed.rs; shared declaration-name validation is in ast/interfaces.rs (Design::collect).

Acceptance criteria:

  • Validate the shared module/interface namespace whenever relevant interface declarations exist, including sources with no interface ports.
  • Add diagnostic regressions for both declaration orders and local-instance-only use.
  • Preserve selective analysis of unrequested interface semantics; namespace validation must not reintroduce eager rejection of unrelated unsupported interfaces.

Status: review finding checked against the current source; no new executable reproduction was run for this tracking task. Confirm the reproducer before implementing the fix.

Activity

  1. added 3 commits that reference this issue on Oct 20, 2026
    bfe716b
    4dba364
    5fbd5f6
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