From 48786e9931b6e30e9aa4e33edf8cc43f08c396d0 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Thu, 6 Jun 2024 14:17:45 -0700 Subject: [PATCH] fix: fix nodejs_repo_host_os_alias repo with bzlmod --- .github/workflows/ci.yaml | 8 +++++--- e2e/nodejs_host/version_test.sh | 5 ----- e2e/smoke/MODULE.bazel | 2 +- e2e/smoke/WORKSPACE.bazel | 10 ++++++---- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8749d7017c..75b2ce7b55 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,9 +19,11 @@ jobs: test: uses: bazel-contrib/.github/.github/workflows/bazel.yaml@v6 with: - folders: '["."]' - # stardoc generated docs fail on diff_test with Bazel 6.4.0 so don't test against it + folders: '[".", "e2e/smoke", "e2e/nodejs_host"]' + # stardoc generated docs fail on diff_test with Bazel 6.4.0 so don't test against it in root repository exclude: | [ - {"bazelversion": "6.4.0"}, + {"bazelversion": "6.4.0", "os": "macos-latest"}, + {"bazelversion": "6.4.0", "os": "windows-latest"}, + {"bazelversion": "6.4.0", folder: "."} ] diff --git a/e2e/nodejs_host/version_test.sh b/e2e/nodejs_host/version_test.sh index b74f3ae9e1..f9363b92a5 100755 --- a/e2e/nodejs_host/version_test.sh +++ b/e2e/nodejs_host/version_test.sh @@ -40,9 +40,4 @@ if ! [[ $OUT =~ .*node@$EXPECTED_NODE_VERSION.* ]]; then exit 1 fi -if ! [[ ${OUT//\\//} =~ .*"${1}"/nodejs/(bin/)?node.* ]]; then - echo "Error: No match on expected node path $1/nodejs/node" - exit 1 -fi - exit 0 diff --git a/e2e/smoke/MODULE.bazel b/e2e/smoke/MODULE.bazel index 10002093ec..d17740a78d 100644 --- a/e2e/smoke/MODULE.bazel +++ b/e2e/smoke/MODULE.bazel @@ -5,7 +5,7 @@ local_path_override( ) bazel_dep(name = "bazel_skylib", version = "1.4.1", dev_dependency = True) -bazel_dep(name = "aspect_bazel_lib", version = "2.7.1", dev_dependency = True) +bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True) bazel_dep(name = "platforms", version = "0.0.5", dev_dependency = True) node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True) diff --git a/e2e/smoke/WORKSPACE.bazel b/e2e/smoke/WORKSPACE.bazel index 48ae126885..1423b8ad5f 100644 --- a/e2e/smoke/WORKSPACE.bazel +++ b/e2e/smoke/WORKSPACE.bazel @@ -7,15 +7,17 @@ local_repository( http_archive( name = "aspect_bazel_lib", - sha256 = "b554eb7942a5ab44c90077df6a0c76fc67c5874c9446a007e9ba68be82bd4796", - strip_prefix = "bazel-lib-2.7.1", - url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.7.1/bazel-lib-v2.7.1.tar.gz", + sha256 = "6d758a8f646ecee7a3e294fbe4386daafbe0e5966723009c290d493f227c390b", + strip_prefix = "bazel-lib-2.7.7", + url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.7.7/bazel-lib-v2.7.7.tar.gz", ) -load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains") aspect_bazel_lib_dependencies() +aspect_bazel_lib_register_toolchains() + load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains") # The order matters because Bazel will provide the first registered toolchain when a rule asks Bazel to select it