Skip to content

Fix rules to work with --incompatible_auto_exec_groups #2035

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .aspect/bazelrc/correctness.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test --test_verbose_timeout_warnings
# Allow the Bazel server to check directory sources for changes. Ensures that the Bazel server
# notices when a directory changes, if you have a directory listed in the srcs of some target.
# Recommended when using
# [copy_directory](https://github.com/aspect-build/bazel-lib/blob/main/docs/copy_directory.md) and
# [copy_directory](https://github.com/bazel-contrib/bazel-lib/blob/main/docs/copy_directory.md) and
# [rules_js](https://github.com/aspect-build/rules_js) since npm package are source directories
# inputs to copy_directory actions.
# Docs: https://bazel.build/reference/command-line-reference#flag--host_jvm_args
Expand Down
19 changes: 13 additions & 6 deletions .aspect/bazelrc/performance.bazelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Don't apply `--noremote_upload_local_results` and `--noremote_accept_cached` to the disk cache.
# If you have both `--noremote_upload_local_results` and `--disk_cache`, then this fixes a bug where
# Bazel doesn't write to the local disk cache as it treats as a remote cache.
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_remote_results_ignore_disk
build --incompatible_remote_results_ignore_disk

# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs.
# Save time on Sandbox creation and deletion when many of the same kind of action run during the
# build.
Expand All @@ -18,3 +12,16 @@ build --experimental_reuse_sandbox_directories
# author.
# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles
build --nolegacy_external_runfiles

# Avoid creating a runfiles tree for binaries or tests until it is needed.
# Docs: https://bazel.build/reference/command-line-reference#flag--build_runfile_links
# See https://github.com/bazelbuild/bazel/issues/6627
#
# This may break local workflows that `build` a binary target, then run the resulting program
# outside of `bazel run`. In those cases, the script will need to call
# `bazel build --build_runfile_links //my/binary:target` and then execute the resulting program.
build --nobuild_runfile_links

# Needed prior to Bazel 8; see
# https://github.com/bazelbuild/bazel/issues/20577
coverage --build_runfile_links
3 changes: 3 additions & 0 deletions .github/workflows/bazel7.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ common --noexperimental_check_external_repository_files
# but got [email protected] in the resolved dependency graph.
common --check_direct_dependencies=off

# Make sure we don't regress this.
common --incompatible_auto_exec_groups

# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs.
# Save time on Sandbox creation and deletion when many of the same kind of action run during the
# build.
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module(

# Lower-bounds (minimum) versions for direct runtime dependencies.
# Do not bump these unless rules_js requires a newer version to function.
bazel_dep(name = "aspect_bazel_lib", version = "2.8.1")
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2")
bazel_dep(name = "bazel_features", version = "1.9.0")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "platforms", version = "0.0.5")
Expand Down
1 change: 1 addition & 0 deletions e2e/bzlmod/other_module/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module(name = "other_module")

bazel_dep(name = "aspect_bazel_lib", version = "2.9.2")
bazel_dep(name = "aspect_rules_js", version = "0.0.0")

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
Expand Down
2 changes: 1 addition & 1 deletion e2e/gyp_no_install_script/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
bazel_dep(name = "platforms", version = "0.0.9", dev_dependency = True)

npm = use_extension(
Expand Down
2 changes: 1 addition & 1 deletion e2e/js_image_oci/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
bazel_dep(name = "container_structure_test", version = "1.16.0", dev_dependency = True)
bazel_dep(name = "platforms", version = "0.0.10", dev_dependency = True)
bazel_dep(name = "rules_nodejs", version = "6.3.0", dev_dependency = True)
Expand Down
2 changes: 1 addition & 1 deletion e2e/js_run_devserver/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "rules_go", version = "0.46.0", dev_dependency = True)

Expand Down
2 changes: 1 addition & 1 deletion e2e/npm_translate_lock/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "platforms", version = "0.0.9", dev_dependency = True)

Expand Down
2 changes: 1 addition & 1 deletion e2e/npm_translate_lock_disable_hooks/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "platforms", version = "0.0.9", dev_dependency = True)

Expand Down
2 changes: 1 addition & 1 deletion e2e/npm_translate_lock_empty/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "platforms", version = "0.0.9", dev_dependency = True)

Expand Down
2 changes: 1 addition & 1 deletion e2e/npm_translate_lock_replace_packages/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module(

bazel_dep(name = "platforms", version = "0.0.5")
bazel_dep(name = "aspect_rules_js", version = "0.0.0")
bazel_dep(name = "aspect_bazel_lib", version = "2.7.7")
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2")
bazel_dep(name = "bazel_skylib", version = "1.5.0")

local_path_override(
Expand Down
2 changes: 1 addition & 1 deletion e2e/pnpm_lockfiles/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PNPM_LOCK_TEST_CASES = [
"versionless-patch-v9.yaml",
]

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7")
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2")

bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "rules_nodejs", version = "6.3.0", dev_dependency = True)
Expand Down
2 changes: 1 addition & 1 deletion e2e/pnpm_workspace/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "rules_nodejs", version = "6.3.0", dev_dependency = True)

Expand Down
2 changes: 1 addition & 1 deletion e2e/pnpm_workspace_rerooted/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "rules_nodejs", version = "6.3.0", dev_dependency = True)

Expand Down
2 changes: 1 addition & 1 deletion e2e/repo_mapping/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module(
)

bazel_dep(name = "aspect_rules_js", version = "0.0.0", repo_name = "rules_js-repo_name")
bazel_dep(name = "aspect_bazel_lib", version = "2.7.7")
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2")
bazel_dep(name = "bazel_skylib", version = "1.5.0")

local_path_override(
Expand Down
2 changes: 1 addition & 1 deletion e2e/runfiles/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)

npm = use_extension(
"@aspect_rules_js//npm:extensions.bzl",
Expand Down
2 changes: 1 addition & 1 deletion e2e/stamped_package_json/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
2 changes: 1 addition & 1 deletion e2e/webpack_devserver/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "rules_go", version = "0.46.0", dev_dependency = True)

Expand Down
2 changes: 1 addition & 1 deletion e2e/webpack_devserver_esm/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "rules_go", version = "0.46.0", dev_dependency = True)

Expand Down
2 changes: 1 addition & 1 deletion e2e/worker/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local_path_override(
path = "../..",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.7", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.2", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "rules_nodejs", version = "6.3.0", dev_dependency = True)

Expand Down
1 change: 1 addition & 0 deletions npm/private/npm_package_store.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ def _npm_package_store_impl(ctx):
"--directory",
package_store_directory.path,
],
toolchain = "@aspect_bazel_lib//lib:tar_toolchain_type",
mnemonic = "NpmPackageExtract",
progress_message = "Extracting npm package {}@{}".format(package, version),
# Workaround https://github.com/bazelbuild/bazel-central-registry/issues/2256
Expand Down
Loading