Repository navigation
fix(rust): a use through a module with a file per cfg reaches the item one file holds - #3184
Merged
Merged
Conversation
…m one file holds tokio's `use crate::process::unix::GlobalOrphanQueue;` linked nothing on main, where 1.6.2 linked it. Since PR #3014 a `use` path walks the crate's modules, and tokio's `mod unix { pub(crate) use super::imp::*; }` globs a module with a `#[path]` for each cfg: `unix/mod.rs` or `windows.rs`. rustSubmodule answered null for such a module, so the glob couldn't be followed and the import had no target. The fix: rustSubmodule keeps every file the alternatives name (RustModule.choices), and rustCfgChoiceItems looks a name up in all of them. What one alternative holds is that one's, whichever the build takes; a name two of them hold is the build's choice and stays unread, as PR #3064 pinned. A step further down the path walks each alternative the same way. Validation: - rust-path-attribute-modules.test.ts: 2 of its new cases fail on main and all 9 pass. - A/B against main 4499d00: tokio +7 imports, all true (the reported edge, `Wait` and `OrphanQueue` through `imp::orphan`, `AtomicU64` through tokio's cfg'd `imp`), and 2 calls keep their target by the import instead of by name. ripgrep, clap, serde, dioxus, gleam and axum byte-identical (axum's 24 "moved" are the diff tool's duplicate route nodes, identical by row); controls flask and express identical. - CPU, dioxus, median of 5 interleaved: 33.97 to 33.28 s. Resolution only, so no kernel change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bompus
added a commit
to bompus/codegraph
that referenced
this pull request
Nov 2, 2026
…m one file holds (colbymchenry#3184) Ported from upstream 221d80c
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.
tokio's
use crate::process::unix::GlobalOrphanQueue;linked nothing onmain, where 1.6.2 linked it. Since PR #3014 a
usepath walks the crate'smodules, and tokio's
mod unix { pub(crate) use super::imp::*; }globs amodule with a
#[path]for each cfg:unix/mod.rsorwindows.rs.rustSubmodule answered null for such a module, so the glob couldn't be
followed and the import had no target.
The fix: rustSubmodule keeps every file the alternatives name
(RustModule.choices), and rustCfgChoiceItems looks a name up in all of them.
What one alternative holds is that one's, whichever the build takes; a name
two of them hold is the build's choice and stays unread, as PR #3064 pinned.
A step further down the path walks each alternative the same way.
Validation:
all 9 pass.
WaitandOrphanQueuethroughimp::orphan,AtomicU64through tokio'scfg'd
imp), and 2 calls keep their target by the import instead of byname. ripgrep, clap, serde, dioxus, gleam and axum byte-identical (axum's
24 "moved" are the diff tool's duplicate route nodes, identical by row);
controls flask and express identical.
no kernel change.
Suite: 874 files passed, 6 skipped; 10,847 tests passed, 2 expected fail, 87 skipped, with the kernel on Windows, on the stack of these 8 PRs at 00b79ff2 over main 1f188da. The A/B numbers are against 4499d00; the stack on 1f188da is edge for edge the same arm on jsoup, rocksdb's java/, Minestom, okhttp, tokio, caddy, Alamofire, nowinandroid and mihon, and those repos give the same graph on both mains.
🤖 Generated with Claude Code