Skip to content

import graph: swift-package-manager as Swift's second repo (0 -> 510 imports) (Part of #3798) - #6636

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/3798-swift-spm
Oct 25, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/3798-swift-spm

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3798. Checklist: partial -- Swift now has a measurable n; engine gap on scoped imports is open.

What

Adds swiftlang/swift-package-manager@80c1fcb89bab (1891 swift files, ~800 scoped imports naming in-repo targets such as Basics, PackageModel, PackageGraph) as Swift's second import-graph repo. swift-argument-parser has no scoped imports, so Swift had n = 0 after #6631. Corpus line, regenerated baseline (Swift-only diff) and coverage chart; no code change.

Swift: 510 resolvable imports, 348 engine edges, precision 85.3%, recall 65.3% (FP 51, FN 177). Candidates rejected: swift-nio (209 scoped imports, all WinSDK/Foundation), swift-collections (1).

Class / Sibling gaps

Class: a language whose import-graph n is too small or zero to quote (#3798). This slice covers Swift. Sibling gaps: Go (engine bug: stdlib linked by file stem, nested go.mod), Perl (use lines in POD counted), and the languages without extractors (Groovy done, Elixir, Erlang, OCaml, Julia, R, Nim, Obj-C++, HCL) -- none has a burned-estate program needing it (scope: sweep).

Remaining slices

  1. Engine: a scoped import struct|class Mod.Name resolves by stem (Name.swift) in network_risk_sensor.py, but SwiftPM declares types in differently named files (ObservabilityScope in Observability.swift): 151 of 177 FN are capture-missed. Needs a per-target declaration index or a fallback; plus the Basics/URL.swift FPs (42, truth sees no import in file; probably extension-based visibility via a bare import Basics, contract C7) -- bucket and decide.
  2. Ledger: 5 open Swift shapes in graph_comparison_ledger.json need verdicts from reading the source (not hand-set here).

Gates

import_graph_accuracy.py --ci swift OK; pr_gates.py --fast 7/7; test_import_graph_accuracy / graph_ledger / graph_accuracy_plan / graph_coverage_chart 120 passed. No engine change, so no golden bless. CI cost note: the accuracy job now fetches and scans a 1.9k-file repo for swift.

Facts checked: baseline regenerated with the full run, diff is Swift only.

🤖 Generated with Claude Code

…resolvable imports) (Part of #3798)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 25, 2026 12:33
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 25, 2026 12:35
@squid-shepherd
squid-shepherd Bot merged commit b082d3a into main Oct 25, 2026
63 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/3798-swift-spm branch October 25, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant