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

fix: register Node.js toolchains in correct order #3750

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,22 @@ node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(name = "nodejs")
use_repo(node, "nodejs_toolchains")

register_toolchains("@nodejs_toolchains//:all")
# Toolchain registration under bzlmod should match the order of WORKSPACE registration
thesayyn marked this conversation as resolved.
Show resolved Hide resolved
# which is the order specified in the PLATFORMS dict https://github.com/bazelbuild/rules_nodejs/blob/4c373209b058d46f2a5f9ab9f8abf11b161ae459/nodejs/private/nodejs_toolchains_repo.bzl#L20.
# For each platform, `:<PLATFORM>_toolchain_target` should be registered before `:<PLATFORM>_toolchain`,
# https://github.com/bazelbuild/rules_nodejs/blob/4c373209b058d46f2a5f9ab9f8abf11b161ae459/nodejs/repositories.bzl#L461/.
# See https://github.com/bazelbuild/bazel/issues/19645 and https://github.com/bazelbuild/rules_nodejs/pull/3750 for more context.
register_toolchains("@nodejs_toolchains//:linux_amd64_toolchain_target")
register_toolchains("@nodejs_toolchains//:linux_amd64_toolchain")
register_toolchains("@nodejs_toolchains//:linux_arm64_toolchain_target")
register_toolchains("@nodejs_toolchains//:linux_arm64_toolchain")
register_toolchains("@nodejs_toolchains//:linux_s390x_toolchain_target")
register_toolchains("@nodejs_toolchains//:linux_s390x_toolchain")
register_toolchains("@nodejs_toolchains//:linux_ppc64le_toolchain_target")
register_toolchains("@nodejs_toolchains//:linux_ppc64le_toolchain")
register_toolchains("@nodejs_toolchains//:darwin_amd64_toolchain_target")
register_toolchains("@nodejs_toolchains//:darwin_amd64_toolchain")
register_toolchains("@nodejs_toolchains//:darwin_arm64_toolchain_target")
register_toolchains("@nodejs_toolchains//:darwin_arm64_toolchain")
register_toolchains("@nodejs_toolchains//:windows_amd64_toolchain_target")
register_toolchains("@nodejs_toolchains//:windows_amd64_toolchain")
Loading