Conversation
Merging this PR will degrade performance by 3.79%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Boshen
added a commit
that referenced
this pull request
Jul 11, 2026
Replaces the `cfg-if` crate with `std::cfg_select!`, which was stabilized in Rust 1.95 (its rustdoc even carries `doc(alias = "cfg-if")` as the intended replacement). This drops one dependency. - Sites with real platform/feature branching (`metadata`, `symlink_metadata`, `read_link`, `Cache::canonicalize`, `normalize_with` wasm handling, `ResolverGeneric::new`/`clone_with_options`) become `cfg_select!` arms; the two `let` sites use it in expression position, which `cfg_if!` could not do. - The five Yarn-PnP early-return guards in `FileSystemOs` and the non-wasm specifier shadowing in `require_impl` had no else branch, so they become plain `#[cfg]` attributes instead of a macro with an empty fallback arm. Verified with `just ready` (fmt, typos, check incl. s390x target, tests for default and `--all-features`, napi build + node tests, pnp tests, clippy `--deny warnings`, doc). Windows and wasm arms are token-identical to before and are covered by CI. Stacked on #1289 (MSRV 1.95.0 bump); retargets to `main` once that merges.
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.
Bumps
rust-versionfrom 1.88.0 to 1.95.0 and updates the stale MSRV note in AGENTS.md (which still said 1.85.0).The toolchain in CI is already 1.97.0, and
cargo clippy --all-features --all-targetsis clean under the newrust-version.This unlocks APIs stabilized in 1.89–1.95; a follow-up PR replaces the
cfg-ifdependency withstd::cfg_select!(stabilized in 1.95).