Repository navigation
Conversation
…st calls `perry-codegen-wasm`'s unit tests do not compile on main 028b066: error[E0425]: cannot find function `run_web_source_around` in this scope --> crates/perry-codegen-wasm/src/emit/tests.rs:1286:9 PerryTS#14718 (abe5c40) added `fetch_with_auth_passes_url_method_body_and_authorization`, which stubs `globalThis.fetch` before the runtime boots through `run_web_source_around(before_boot, source, after_boot)`. The branch defined that helper beside `run_web_source_then`, but the squash merge kept only the test. Main's harness has since grown `run_web_source_with_dom(source, dom, after_boot)`, whose `dom` script already runs before the runtime loads, so the helper is that call with the stub DOM followed by `before_boot`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Closing as a duplicate of #14869, which fixes the same compile error (the fetchWithAuth test's missing |
Summary
perry-codegen-wasm's unit tests do not compile on main 028b066 (error[E0425]: cannot find function run_web_source_aroundatsrc/emit/tests.rs:1286), which also fails the warnings job's all-targets check and the crate'scargo test. #14718 added the fetchWithAuth test together with that helper; the squash merge (abe5c40) kept the test but not the helper. This restores it on top of main's current harness.Changes
crates/perry-codegen-wasm/src/emit/tests.rs:run_web_source_around(before_boot, source, after_boot)=run_web_source_with_dom(source, STUB_DOM + before_boot, after_boot); thedomscript already runs before the runtime loads, which is where the test'sglobalThis.fetchstub must be.Related issue
Refs #14718, #14711, #14595.
Test plan
main 028b066:
RUSTFLAGS="-D warnings" cargo check --workspace --all-targets …→error[E0425]: cannot find function run_web_source_aroundthis branch:
cargo test -p perry-codegen-wasm --lib fetch_with_auth→fetch_with_auth_passes_url_method_body_and_authorization ... ok,async_body_fetch_with_auth_sends_the_auth_header ... okBASE_SHA=upstream/main bash scripts/run_lint_gates.shon this branch (macOS): the same 18 FAIL lines as on the sibling branches; none is new. The all-targets warnings gate stays red here for reasons outside this PR (Linux-only snap_image items are dead code on macOS; perry-wpfacts test helpers, fixed separately).I have NOT bumped the workspace version or edited CHANGELOG.md
changelog.dfragment added🤖 Generated with Claude Code
https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
Summary by CodeRabbit