Skip to content

refactor: use hermetic_launcher to invoke node - #2974

Draft
acozzette wants to merge 1 commit into
mainfrom
hermetic-launcher
Draft

refactor: use hermetic_launcher to invoke node#2974
acozzette wants to merge 1 commit into
mainfrom
hermetic-launcher

Conversation

@acozzette

Copy link
Copy Markdown
Contributor

We currently have a trivial shell script that invokes node with a --require flag for our patches. This change replaces that with a hermetic_launcher.

There is no one global node binary we can use, since each toolchain can configure its own node. As a result, we need to stamp out a hermetic_launcher for each js_binary target. This is actually nice, though, because this will allow us to incrementally migrate away from our bash launcher and toward hermetic_launcher. With this change, we have a bash launcher wrapping a hermetic_launcher which itself wraps node.

hermetic_launcher does not support linux ppc64le or windows arm64, so js_binary no longer builds for those two platforms. If we get complaints, we can look into adding support upstream.


Changes are visible to end-users: no

Test plan

  • Covered by existing test cases

We currently have a trivial shell script that invokes node with a `--require`
flag for our patches. This change replaces that with a hermetic_launcher.

There is no one global node binary we can use, since each toolchain can
configure its own node. As a result, we need to stamp out a hermetic_launcher
for each js_binary target. This is actually nice, though, because this will
allow us to incrementally migrate away from our bash launcher and toward
hermetic_launcher. With this change, we have a bash launcher wrapping a
hermetic_launcher which itself wraps node.

hermetic_launcher does not support linux ppc64le or windows arm64, so js_binary
no longer builds for those two platforms. If we get complaints, we can look
into adding support upstream.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant