chore(bindings): remove axios native binding, compile real axios from source - #10679
Draft
proggeramlug wants to merge 2 commits into
Draft
proggeramlug wants to merge 2 commits into
proggeramlug wants to merge 2 commits into
Conversation
… source Deletes the perry-ext-axios crate, perry-stdlib's axios.rs shim, the js_axios_* FFI surface, and every NATIVE_MODULES/manifest/HIR/codegen special-case that existed only to route the native binding. A plain `import axios from "axios"` with no perry.compilePackages entry now resolves and compiles the real npm package (and its transitive deps) from source instead. Must not merge before #10673 (agent-base namespace/export= fallback fix) -- axios's https-proxy-agent dependency needs it to compile.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
Renamed the axios-removal changeset fragment now that the PR number is known, and pointed PENDINGCS-compile-smoke-known.md's dangling placeholder reference at it.
This was referenced Sep 18, 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.
Summary
Removes the axios native binding (
perry-ext-axios,perry-stdlib/src/axios.rs, thejs_axios_*FFI surface, and everyNATIVE_MODULES/manifest/HIR/codegen special-casethat existed only to route it) so
import axios from "axios"resolves to the real npmpackage instead of Perry's hand-written reimplementation. Removal only — no other
binding touched, no behavior changes to anything that stays.
Do not merge before #10673 (
fix/10662-namespace-export-equals-fallback). Thisbranch is based on it, not on
main— axios does not compile without #10673'sagent-base/https-proxy-agentnamespaceexport =fallback fix. If this PR mergesfirst, real-source axios (and anything depending on it) breaks.
What was deleted
crates/perry-ext-axios(crate +Cargo.tomlworkspace membership)crates/perry-stdlib/src/axios.rsand itsmod/pub useinlib.rs, and the axiosresponse-property arm in
common/dispatch/property_dispatch.rs[bindings.axios]block inwell_known_bindings.toml"axios"NATIVE_MODULESentry and its 11 manifest method rows (entries.rs,entries/part_4.rs)(
lower_call/options/fetch.rs), and thejs_axios_*FFI declarations(
runtime_decls/stdlib_ffi/third_party.rs) plus their runtime/no-op-stubimplementations (
perry-runtime/src/closure/v8_stubs.rs+closure/mod.rs'sre-export,
perry-ui-android/src/stdlib_stubs.rs)Response" local-instance tagging that existedonly to route
.status/.data/.statusTextthrough the now-deleted native dispatch(
local_natives.rs,destructuring/var_decl/native_new.rs,lower/module_decl.rs,lower/stmt.rs)emit.rs's "callable default export" special-case, which existed only for axios'saxios(config)shape (its two axios-specific.d.tstests went with it)axios_response_property_lowering.rs) and the native-dispatchNaN-boxing regression test (
test_issue_340_axios_response_props.ts+ itsknown_failures.jsonentry) — both tested internals of the deleted shimworkspace-architecture.json's crate entry and baseline counts (workspace_members83→82,
decision_counts.externalize33→32)Regenerated
docs/api/perry.d.ts,docs/src/api/reference.md, anddocs/src/native-libraries/governance.md's table. Dropped axios's row/section fromdocs/native-libraries.mdand its line from theperry native listexample indocs/src/cli/commands.md. Swappedunimplemented_api_check.rs'ssupported_module_with_unknown_member_is_rejectedwitness from axios tonode-fetch(still native) since the test needs a live
NATIVE_MODULESmember.Left alone (still legitimate as npm-package-name examples, unrelated to the native
binding): axios entries in
crates/perry/src/commands/install/scanner/typosquat.rs+top_packages.txt(typosquat popularity data),crates/perry-hir/src/capability.rs(per-package capability-policy test fixtures), and comments across
perry-stdlib/perry-runtime/perry-codegendescribing real axios behavior thatmotivated generic (non-axios-specific) fixes.
The acceptance test that matters
A plain
import axios from "axios"with noperry.compilePackagesentry for axios atall compiles and runs correctly. Verified two ways:
tests/release/packages/axios-get— itspackage.jsonalready had nocompilePackagesblock (it didn't need one when axios was native) and needs none noweither.
bash fixture.shpasses: real GET/HEAD/OPTIONS round-trip against anin-process
node:httpserver, diffed againstexpected.txt.{"dependencies": {"axios": "^1"}}+npm install,compiled and run against a live server —
RESULT: PASS.No
package.jsonconfiguration beyond a plain"axios"dependency is required.Perry's default "compile npm package source when nothing claims the specifier natively"
path picks up axios and its full transitive dependency graph (agent-base,
https-proxy-agent, follow-redirects, form-data, combined-stream, mime-types, debug, and
the rest) automatically —
perry compilereports "130 module(s): 130 native, 0JavaScript" for them. The earlier probe's
perry.compilePackageslist (used to forcenative-source compilation before this removal) is not needed post-removal — that was
testing something different from what a user actually needs to do.
Validation
cargo check --workspace --tests(minus cross-host UI crates): clean except twopre-existing breaks on this base branch, confirmed via
git stashA/B (neithertouches anything this PR changed):
perry-codegen's test target fails to compile(
ImportedClassmissingconstructor_has_synthetic_argumentsin two unrelated testfiles) and
perry-runtime --testscarries one pre-existing dead-code warning inbox.rs.cargo test:perry-api-manifest41/41,perry-hirall suites 0 failed,perry-stdlib139/139 (RUST_TEST_THREADS=1),perry1136 lib tests + the 5integration tests whose comments mention axios (
incoming_message_pipe,issue_10662_namespace_export_equals_fallback,issue_5174_headers_http_pump_hang,response_stream_body_pull) — none depend on axios functionally, all green. Notrun: the full
crates/perry/tests/*.rssweep (~100 files, ~3 min each on the sharedbuild host) — unrelated to this diff, and CI's
e2e-scopedonly runs integrationtests the diff actually names, which is none here.
run_lint_gates.sh SKIP_COMPILE_GATES=1: 76 of 77 script gates pass. The one red("Public benchmark evidence freshness") is pre-existing on every PR in this repo.
Compile tier not run (known-red on Linux per the campaign brief).
cargo fmt --all -- --check: clean.axios/js_axios_/perry-ext-axiosacross the whole repo before andafter; the only post-removal matches are historical (
CHANGELOG.md, dated auditsnapshots,
docs/po/*.po), illustrative comments/examples unrelated to the nativebinding (typosquat data, capability-policy test fixtures, generic bug-history prose),
and the still-passing
axios-getrelease fixture.