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

build: do not run e2e/runfiles on non-bzlmod #1986

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ jobs:
major: 6
bzlmod: 0
folder: e2e/gyp_no_install_script
# @bazel/runfiles seems broken with non-bzlmod + bazel7
# https://github.com/bazel-contrib/rules_nodejs/issues/3797
- bzlmod: 0
folder: e2e/runfiles
include:
- bazel-version:
major: 7
Expand Down
27 changes: 25 additions & 2 deletions e2e/runfiles/WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# The presence of this file causes WORKSPACE to be ignored when bzlmod is enabled.
# See https://docs.google.com/document/d/1JtXIVnXyFZ4bmbiBCr5gsTH4-opZAFf5DMMb-54kES0/edit#heading=h.y054fjub9max
local_repository(
name = "aspect_rules_js",
path = "../..",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@aspect_rules_js//js:toolchains.bzl", "DEFAULT_NODE_VERSION", "rules_js_register_toolchains")

rules_js_register_toolchains(node_version = DEFAULT_NODE_VERSION)

load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")

npm_translate_lock(
name = "npm",
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()
2 changes: 2 additions & 0 deletions e2e/runfiles/WORKSPACE.bzlmod
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The presence of this file causes WORKSPACE to be ignored when bzlmod is enabled.
# See https://docs.google.com/document/d/1JtXIVnXyFZ4bmbiBCr5gsTH4-opZAFf5DMMb-54kES0/edit#heading=h.y054fjub9max
6 changes: 6 additions & 0 deletions examples/runfiles/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ js_test(
":node_modules/@bazel/runfiles",
],
entry_point = "test.js",
# @bazel/runfiles seems broken with non-bzlmod + bazel7
# https://github.com/bazel-contrib/rules_nodejs/issues/3797
target_compatible_with = select({
"@aspect_bazel_lib//lib:bzlmod": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
)

# Path of file must start similar to `test_fixture.md` in order to regression-test a
Expand Down
Loading