Skip to content

Commit

Permalink
chore: bump bazel-lib to 2.0
Browse files Browse the repository at this point in the history
Note: users might still bring 1.x version of bazel-lib, and we permit that to the extent that it still works.
  • Loading branch information
alexeagle committed Oct 10, 2023
1 parent c50bd3f commit b117b5a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rules_js_dependencies()

load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "register_coreutils_toolchains", "register_jq_toolchains")

aspect_bazel_lib_dependencies(override_local_config_platform = True)
aspect_bazel_lib_dependencies()

register_jq_toolchains()

Expand Down
2 changes: 1 addition & 1 deletion e2e/bzlmod/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")
bazel_dep(name = "aspect_bazel_lib", version = "1.32.1")
bazel_dep(name = "aspect_bazel_lib", version = "2.0.0-rc0")
bazel_dep(name = "bazel_skylib", version = "1.4.1")

local_path_override(
Expand Down
4 changes: 2 additions & 2 deletions js/private/js_image_layer.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ js_image_layer(
```
"""

load("@aspect_bazel_lib//lib:paths.bzl", "to_manifest_path")
load("@aspect_bazel_lib//lib:paths.bzl", "to_rlocation_path")
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@aspect_bazel_lib//lib:utils.bzl", "is_bazel_6_or_greater")

Expand Down Expand Up @@ -189,7 +189,7 @@ def _write_laucher(ctx, executable_path):
return launcher

def _runfile_path(ctx, file, runfiles_dir):
return paths.join(runfiles_dir, to_manifest_path(ctx, file))
return paths.join(runfiles_dir, to_rlocation_path(ctx, file))

def _runfiles_dir(root, default_info):
manifest = default_info.files_to_run.runfiles_manifest
Expand Down
6 changes: 3 additions & 3 deletions js/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def rules_js_dependencies():

http_archive(
name = "aspect_bazel_lib",
sha256 = "44f4f6d1ea1fc5a79ed6ca83f875038fee0a0c47db4f9c9beed097e56f8fad03",
strip_prefix = "bazel-lib-1.34.0",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v1.34.0/bazel-lib-v1.34.0.tar.gz",
sha256 = "91acfc0ef798d3c87639cbfdb6274845ad70edbddfd92e49ac70944f08f97f58",
strip_prefix = "bazel-lib-2.0.0-rc0",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.0.0-rc0/bazel-lib-v2.0.0-rc0.tar.gz",
)

http_archive(
Expand Down
6 changes: 5 additions & 1 deletion npm/private/npm_package.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ load(":npm_package_info.bzl", "NpmPackageInfo")

# Pull in all copy_to_directory attributes except for exclude_prefixes
copy_to_directory_lib_attrs = dict(copy_to_directory_lib.attrs)
copy_to_directory_lib_attrs.pop("exclude_prefixes")
copy_to_directory_lib_attrs.pop(
"exclude_prefixes",
# It was removed in bazel-lib 2.0, so default to ignoring.
None,
)

_NPM_PACKAGE_ATTRS = dicts.add(copy_to_directory_lib_attrs, {
"data": attr.label_list(),
Expand Down

0 comments on commit b117b5a

Please sign in to comment.