Repository navigation
Swift: a bare module import draws no file edge (22 FP -> 0) (Part of #3798) - #6631
Merged
Merged
Conversation
…rgument-parser) (Part of #3798) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
4 tasks done
Contributor
|
No description provided. |
Contributor
Contributor
|
No description provided. |
1 similar comment
Contributor
|
No description provided. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3798
Swift
import Foundationnamed a module (a SwiftPM target, no file of its own, import contract C7), but the engine's name index linked it to any file with that stem: 22 false edges in apple/swift-argument-parser, all toSources/ArgumentParser/Utilities/Foundation.swift._resolve_targetnow draws no edge for a Swift bare single-segment token. A scopedimport struct Mod.Name(dotted token) still resolves.Measured (graph comparison, swift): engine edges 22 -> 0, FP 22 -> 0. Swift is now unscored (n = 0 resolvable imports on this repo; precision n/a), so the language needs a second Swift repo that uses scoped imports before it can be quoted.
Class / Sibling gaps
Class: a module/namespace import with no file of its own resolved to a same-stem file by the name index. Swift is fixed here, with a test over bare,
@testable/@_exported-style module names, scoped imports, and a non-Swift control.Sibling gaps:
using Ns;-> same-stemNs.cs(118 FP, precision 17.5%): needs a C7 ruling first (tokens are dotted, so the guard differs); no burned estate needs it (scope: sweep).Facts checked: golden masters (
crucible_check.py) PASS both legs;pr_gates --fast7/7;--ratchets9/9. The Go baseline entry moved 122 -> 121 edges (FP 1 -> 0) when regenerated after merging main; not caused by this change (Swift-only guard). The graph ledger regenerate also picked up C# shapes from xunit (#6627).Files: network_risk_sensor.py, new test, import_rule_contract.md (3 hand-written); baseline, chart SVG, ledger regenerated.
🤖 Generated with Claude Code