Skip to content

swift: _dependency_capture requires 2+ char module names, silently dropping single-letter imports from the DAG #2543

Closed

Description

@squid-protocol

Summary

Found by the #1096 control corpus: swift's _dependency_capture requires module names of 2+ characters — ([a-zA-Z_][\w.]+) — so import a captures nothing, the dependency edge is lost, popularity stays 0, and the Contextual Baseline Fix never fires for the target file.

Evidence

The corpus's swift chain (main→a→b→c via import a etc.) is the only brace-family folder whose orphan→api conversion never fires (orphaned_logic stays 3 on all imported files); every sibling language (use a, import a, #include "a.c", …) resolves and converts. Other languages' capture groups use *-shaped tails; swift's + looks unintentional.

Impact

Small in the wild (single-letter modules are rare) but it silently truncates DAGs where they exist; the fix is one character ([\w.]+ → [\w.]*).

References

#1096 corpus ledger swift-import-capture-min-two-chars.

Activity

  1. added
    core-engine
    on Aug 31, 2026
  2. added 2 commits that reference this issue on Sep 2, 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

    Labels

    core-engine

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions