|
| 1 | +diff --git nodejs/private/toolchains_repo.bzl nodejs/private/toolchains_repo.bzl |
| 2 | +index 9dcdc60..4927e75 100644 |
| 3 | +--- nodejs/private/toolchains_repo.bzl |
| 4 | ++++ nodejs/private/toolchains_repo.bzl |
| 5 | +@@ -70,7 +70,7 @@ def _toolchains_repo_impl(repository_ctx): |
| 6 | + |
| 7 | + # Forward all the providers |
| 8 | + def _resolved_toolchain_impl(ctx): |
| 9 | +- toolchain_info = ctx.toolchains["@rules_nodejs//nodejs:toolchain_type"] |
| 10 | ++ toolchain_info = ctx.toolchains["@build_bazel_rules_nodejs//nodejs:toolchain_type"] |
| 11 | + return [ |
| 12 | + toolchain_info, |
| 13 | + toolchain_info.default, |
| 14 | +@@ -82,7 +82,7 @@ def _resolved_toolchain_impl(ctx): |
| 15 | + # https://cs.opensource.google/bazel/bazel/+/master:tools/jdk/java_toolchain_alias.bzl |
| 16 | + resolved_toolchain = rule( |
| 17 | + implementation = _resolved_toolchain_impl, |
| 18 | +- toolchains = ["@rules_nodejs//nodejs:toolchain_type"], |
| 19 | ++ toolchains = ["@build_bazel_rules_nodejs//nodejs:toolchain_type"], |
| 20 | + incompatible_use_toolchain_transition = True, |
| 21 | + ) |
| 22 | + """ |
| 23 | +@@ -107,7 +107,7 @@ toolchain( |
| 24 | + exec_compatible_with = {compatible_with}, |
| 25 | + target_compatible_with = {compatible_with}, |
| 26 | + toolchain = "@{user_node_repository_name}_{platform}//:node_toolchain", |
| 27 | +- toolchain_type = "@rules_nodejs//nodejs:toolchain_type", |
| 28 | ++ toolchain_type = "@build_bazel_rules_nodejs//nodejs:toolchain_type", |
| 29 | + ) |
| 30 | + """.format( |
| 31 | + platform = platform, |
| 32 | +diff --git nodejs/repositories.bzl nodejs/repositories.bzl |
| 33 | +index 494217b..6dfb8fb 100644 |
| 34 | +--- nodejs/repositories.bzl |
| 35 | ++++ nodejs/repositories.bzl |
| 36 | +@@ -690,7 +690,7 @@ filegroup( |
| 37 | + # the platform attribute is only set when used from this file, not from build_bazel_rules_nodejs |
| 38 | + if repository_ctx.attr.platform: |
| 39 | + build_content += """ |
| 40 | +-load("@rules_nodejs//nodejs:toolchain.bzl", "node_toolchain") |
| 41 | ++load("@build_bazel_rules_nodejs//nodejs:toolchain.bzl", "node_toolchain") |
| 42 | + node_toolchain(name = "node_toolchain", target_tool = ":node_bin") |
| 43 | + """ |
| 44 | + repository_ctx.file("BUILD.bazel", content = build_content) |
0 commit comments