fix(core): restore the wasm walker imports dropped by a stray cfg attribute - #36924
Merged
Conversation
…ribute `#[cfg(...)]` binds to the single item that follows it. In walker.rs that item was the `enable_logger` import, and removing it in #36895 re-homed the attribute onto the `utils` import below, gating `Normalize`, `get_mod_time` and `parent_gitignore_files` out of the wasm32 build. All three are still used there: the wasm `nx_walker` calls `to_normalized_string` and `get_mod_time`, and `create_walker` — shared by both targets — calls `parent_gitignore_files`. None of them need gating. Verified `cargo check -p nx` and `cargo check -p nx --target wasm32-wasip1-threads` both pass.
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit d589c66
☁️ Nx Cloud last updated this comment at |
AgentEnder
force-pushed
the
fix/wasm-walker-cfg-imports
branch
7 times, most recently
from
September 4, 2026 22:13
c18fcab to
d589c66
Compare
FrozenPandaz
approved these changes
Sep 4, 2026
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.
Current Behavior
#[cfg]binds to the single item that follows it. When #36895 removed theenable_loggerimport fromwalker.rs, the#[cfg(not(target_arch = "wasm32"))]above it landed on theutilsimport instead, gatingNormalize,get_mod_timeandparent_gitignore_filesout of the wasm build. All three are still used there.Nothing in PR CI compiles for wasm32, so this only showed up in
pnpm build:wasmat publish time. A CI check for that is worth adding, but it needs a second Rust toolchain wired up, so it is being handled separately rather than here.Expected Behavior
The wasm build compiles. None of those imports need gating.
Related Issue(s)
Fixes #