Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get node binary via @nodejs//:node #1151

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jfirebaugh
Copy link
Contributor

I had a colleague using an arm64 mac whose builds were failing because platform.machine() was returning amd64 for some reason (my guess is the python toolchain was running under Rosetta). Then emscripten_config looked for the node binary in a nonexistent directory -- nodejs_darwin_amd64 rather than nodejs_darwin_arm64.

This switches to a public rules_nodejs API for obtaining the binary, so should always work.

I had a colleague using an arm64 mac whose builds were failing because `platform.machine()` was returning amd64 for some reason (my guess is the python toolchain was running under Rosetta). Then emscripten_config looked for the node binary in a nonexistent directory -- nodejs_darwin_amd64 rather than nodejs_darwin_arm64.

This switches to a public rules_nodejs API for obtaining the binary, so should always work.
@walkingeyerobot walkingeyerobot enabled auto-merge (squash) December 17, 2022 02:41
auto-merge was automatically disabled December 20, 2022 02:19

Head branch was pushed to by a user without write access

@jfirebaugh
Copy link
Contributor Author

I had to make two changes to get test-bazel-windows to pass:

  • Use @nodejs//:node_bin on Windows rather than @nodejs//:node. I don't know why this is necessary but it mirrors the previous logic in emscripten_config. @nodejs//:node_bin is the .../bin/nodejs/node.exe path.
  • Pin Bazel to 5.4.0, which seems to be the version that was tested prior to the 6.0.0 release today. This is a workaround for Error with Bazel 6 on Windows #1153.

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.

2 participants