Skip to content

fix(core): restore the wasm walker imports dropped by a stray cfg attribute - #36924

Merged
FrozenPandaz merged 1 commit into
masterfrom
fix/wasm-walker-cfg-imports
Sep 5, 2026
Merged

fix(core): restore the wasm walker imports dropped by a stray cfg attribute#36924
FrozenPandaz merged 1 commit into
masterfrom
fix/wasm-walker-cfg-imports

Conversation

@AgentEnder

@AgentEnder AgentEnder commented Sep 4, 2026

Copy link
Copy Markdown
Member

Current Behavior

#[cfg] binds to the single item that follows it. When #36895 removed the enable_logger import from walker.rs, the #[cfg(not(target_arch = "wasm32"))] above it landed on the utils import instead, gating Normalize, get_mod_time and parent_gitignore_files out of the wasm build. All three are still used there.

error[E0599]: no method named `to_normalized_string` found for reference `&std::path::Path` in the current scope
  --> packages/nx/src/native/walker.rs:94:40

Nothing in PR CI compiles for wasm32, so this only showed up in pnpm build:wasm at 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 #

…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.
@AgentEnder
AgentEnder requested a review from a team as a code owner September 4, 2026 21:03
@AgentEnder
AgentEnder requested a review from lourw September 4, 2026 21:03
@netlify

netlify Bot commented Sep 4, 2026

Copy link
Copy Markdown

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit d589c66
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/6a9b4298e4770c000858332d
😎 Deploy Preview https://deploy-preview-36924--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Sep 4, 2026

Copy link
Copy Markdown

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit d589c66
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6a9b429847e01a0008708dd7
😎 Deploy Preview https://deploy-preview-36924--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud

nx-cloud Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit d589c66

Command Status Duration Result
nx affected --targets=lint,oxlint,test,build,e2... ✅ Succeeded 45m 54s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 56s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 18s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-09-04 23:03:53 UTC

@AgentEnder
AgentEnder force-pushed the fix/wasm-walker-cfg-imports branch 7 times, most recently from c18fcab to d589c66 Compare September 4, 2026 22:13
@FrozenPandaz
FrozenPandaz merged commit fc41a1b into master Sep 5, 2026
34 of 35 checks passed
@FrozenPandaz
FrozenPandaz deleted the fix/wasm-walker-cfg-imports branch September 5, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants