Skip to content

res.pipe() has a codegen gap in both auto-optimize and PERRY_NO_AUTO_OPTIMIZE modes (found while fixing #10466, scoped out of it) #10670

Description

@proggeramlug

Found while fixing #10466 (PR #10667) and explicitly scoped out of it: res.pipe() has a codegen gap that exists
in BOTH auto-optimize and PERRY_NO_AUTO_OPTIMIZE=1 modes.
It is neither caused nor fixed by that PR.

#10466 was about client dynamic-dispatch fallbacks being compiled out of the prebuilt archive under
PERRY_NO_AUTO_OPTIMIZE=1. This is different: a genuine codegen defect in res.pipe() itself, mode-independent.

Worth knowing about #10466's repro while you are here

The agent that fixed #10466 found its literal reproduction now passes on current main in both modes
unrelated static-typing work landed since the issue was filed. The still-live gap only appears with
dynamically-dispatched (any-typed) access, which is exactly what an npm package looks like after TypeScript
type stripping, and therefore the shape that actually matters for perry.compilePackages.

That is a general lesson for this campaign's issue backlog: an issue's hand-written repro can go stale while the
underlying defect remains live in the dynamically-typed shape real packages produce.
When an issue "no longer
reproduces", re-check it with any-typed access before closing it.

Context

This came out of work toward deleting Perry's hand-written Rust reimplementations of npm packages in favour of
compiling the real ones. res.pipe() is on the path for HTTP client packages that stream responses.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package-auditFound by the 2026 package audit: compiling real npm packages from source instead of native bindings

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions