Repository navigation
fix(lint): gate Executor::owns_process_image accessor on #[cfg(unix)] (Refs #4206, #4211) - #4258
Merged
Merged
Conversation
caomengxuan666
added a commit
that referenced
this pull request
Nov 28, 2026
) track_cell and stale_names are consumed only by the debug_assertions boundary verifier in executor/variable_state.rs (plus var_table unit tests for track_cell). In a release-profile lib build both are dead code, which turns niubash CI red: it builds the vendored rubash in release with -D warnings. Gate each method on its consumers cfg, mirroring #4258: track_cell on any(debug_assertions, test), stale_names on debug_assertions. No behavior change: in release the tracked set is always empty already.
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.
Summary
Gate
Executor::owns_process_image(&self)(src/executor/public_accessors.rs:2368, introduced in #4246) with#[cfg(unix)]so WindowsRUSTFLAGS="-D warnings" cargo check --lib --lockedpasses with zero warnings (Refs #4206, #4211).Root Cause
Every call site of the
.owns_process_image()method lives inside Unix-only gates:src/script_driver.rs:9494-9503(#[cfg(unix)])src/script_driver.rs:9549-9565(#[cfg(all(test, unix))])All other references across
src/executor/read the struct fieldself.owns_process_imagedirectly, so thepub(crate)method was dead code on Windows builds.What this PR deletes
dead_codewarning onExecutor::owns_process_imagewithout adding any#[allow(dead_code)]attribute.Verification
RUSTFLAGS="-D warnings" cargo check --lib --locked— 0 warnings, exit 0.python scripts/check-rustfmt.py— ok (225 targets).python scripts/check-api-ledger.py— OK (298 symbols).Refs #4206, #4211