fix(hir): honor lexical fetch bindings - #10900
proggeramlug wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Landed via merge train 253 (#10918) as v0.5.1633 — merge commit Expedited at the owner's request. Carried with nine other PRs; the stacked ones (#10899/#10900 on #10886, #10901 on #10885) had only their unique commits taken. Evidence on the assembled tree: Closing here rather than merging — a train lands the commits directly. |
Closes #10887
Stacked on #10886 because that change is required to reach this node-fetch failure.
Root cause
HIR lowering treated every bare call spelled
fetch(...)as the global Web Fetch API, even when a lexical import or local binding shadowed the global.node-fetchis conventionally imported asfetch, so its userlandResponsewas incorrectly tagged as a native response;response.text()was then routed to native response-handle FFI and rejected withInvalid response handle.Fix
fetch(...)as native only when the unqualified global is not shadowedfetchWithAuth/fetchPostWithAuthwrapper conventionfetchreturning a userland responseValidation
cargo test -p perry-hir a_lexical_fetch_result_is_not_registered_as_a_native_response --libpython3 scripts/check_test_registration.pygit diff --checknode-fetch@3.3.2public-entry fixture no longer throwsInvalid response handle; it advances to the independently tracked derived-constructor failure in Derived class that calls super() then returns a Proxy trips "Must call super constructor" — blocks node-fetch after #10759 #10809