Skip to content

Fix stdin listeners on node:process namespace imports - #11001

Closed
proggeramlug wants to merge 2 commits into
mainfrom
fix/10914-namespaced-process-stdin
Closed

proggeramlug wants to merge 2 commits into
mainfrom
fix/10914-namespaced-process-stdin

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Summary

Fix literal process.stdin.on("data"/"end", ...) calls when process is a namespace import from node:process. The HIR lowering previously classified process.stdin.on as a native class method before reaching the process stream handler, so it registered no listeners.

Allow process stream properties through to the stream handler and recognize namespace/default imports there. Scope checks preserve calls on a locally shadowed process object.

Fixes #10914.

Testing

  • Regression test fails on main with SHADOW undefined and EXIT 0 false 0 0.
  • Regression test passes with the fix on a coherent compiler and static runtime build: SHADOW local, END 5 true, EXIT 0 true 5 true.
  • cargo fmt --all -- --check
  • git diff --check
  • scripts/check_file_size.sh

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 3865aae3-a358-4987-85f8-4e034f3b660f

📥 Commits

Reviewing files that changed from the base of the PR and between c7cbc3c and 5e856ba.

📒 Files selected for processing (3)
  • changelog.d/11001-process-namespace-stdin.md
  • crates/perry-hir/src/lower/expr_call/module_class_static.rs
  • crates/perry/tests/issue_10914_namespaced_process_stdin.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug

Copy link
Copy Markdown
Contributor Author

Landed on main in merge train 258 (#11078, v0.5.1641), main e27f0a068a.

Carried at head 5e856ba50f. CI on the train head was fully green — 22 jobs, zero failures, the first train since the public-baseline artifact was regenerated, so no known-red line to read past.

This train was bisect-verified: after an earlier 35-PR assembly hit five gap regressions, the lowering-touching PRs were split into probes, and this set (#11070) came back with all six gap shards clean while the other half reproduced all five.

Trains rebase-merge, so commits get new SHAs and GitHub cannot mark this merged. Closed as landed.

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

Labels

None yet

Projects

None yet

1 participant