Skip to content
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
11 changes: 5 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,24 @@ module(

# Lower-bound dependency versions.
# Do not change unless the rules no longer work with the current version.
# Needed for #804 Use statically-linked bsdtar on all platforms
bazel_dep(name = "aspect_bazel_lib", version = "2.6.1")
bazel_dep(name = "bazel_lib", version = "3.0.0")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_oci", version = "1.7.4")
bazel_dep(name = "rules_python", version = "0.29.0")
bazel_dep(name = "jq.bzl", version = "0.4.0")
bazel_dep(name = "tar.bzl", version = "0.7.0")

# Development dependencies which are not exposed to users
bazel_dep(name = "aspect_rules_py", version = "1.6.6", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.2.1.1", dev_dependency = True)
bazel_dep(name = "container_structure_test", version = "1.16.0", dev_dependency = True)

bazel_lib_toolchains = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "toolchains")
bazel_lib_toolchains.jq()
bazel_lib_toolchains = use_extension("@bazel_lib//lib:extensions.bzl", "toolchains")
bazel_lib_toolchains.coreutils()
use_repo(bazel_lib_toolchains, "coreutils_toolchains", "jq_toolchains")
use_repo(bazel_lib_toolchains, "coreutils_toolchains")

register_toolchains(
"@jq_toolchains//:all",
"@coreutils_toolchains//:all",
)

Expand Down
2 changes: 1 addition & 1 deletion aws/private/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bzl_library(
name = "py_lambda",
srcs = [
"py_lambda.bzl",
"@aspect_bazel_lib//lib:tar",
"@tar.bzl//tar:tar",
],
visibility = ["//aws:__subpackages__"],
)
Expand Down
2 changes: 1 addition & 1 deletion aws/private/py_lambda.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"Rule to produce tar files with py_binary deps and app"

load("@aspect_bazel_lib//lib:tar.bzl", "tar")
load("@tar.bzl//tar:tar.bzl", "tar")

# Write these two separate layers, so application changes are a small delta when pushing to a registry
_LAYERS = ["app", "deps"]
Expand Down
8 changes: 4 additions & 4 deletions aws/private/s3_sync.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ _ATTRS = {

def _s3_sync_impl(ctx):
aws_toolchain = ctx.toolchains["//aws:toolchain_type"]
coreutils = ctx.toolchains["@aspect_bazel_lib//lib:coreutils_toolchain_type"]
jq = ctx.toolchains["@aspect_bazel_lib//lib:jq_toolchain_type"]
coreutils = ctx.toolchains["@bazel_lib//lib:coreutils_toolchain_type"]
jq = ctx.toolchains["@jq.bzl//jq/toolchain:type"]

if ctx.attr.aws:
aws_tool_path = ctx.attr.aws[DefaultInfo].default_runfiles.files.to_list()[0].short_path
Expand Down Expand Up @@ -102,7 +102,7 @@ s3_sync = rule(
doc = _DOC,
toolchains = [
"//aws:toolchain_type",
"@aspect_bazel_lib//lib:coreutils_toolchain_type",
"@aspect_bazel_lib//lib:jq_toolchain_type",
"@bazel_lib//lib:coreutils_toolchain_type",
"@jq.bzl//jq/toolchain:type",
],
)
8 changes: 1 addition & 7 deletions aws/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ def rules_aws_dependencies():
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.6.1/bazel-skylib-1.6.1.tar.gz",
],
)
http_archive(
name = "aspect_bazel_lib",
sha256 = "6c25c59581041ede31e117693047f972cc4700c89acf913658dc89d04c338f8d",
strip_prefix = "bazel-lib-2.5.3",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.5.3/bazel-lib-v2.5.3.tar.gz",
)

########
# Remaining content of the file is only used to support toolchains.
Expand Down Expand Up @@ -126,7 +120,7 @@ alias(name = "aws", actual = "//installed:{}/aws", visibility = ["//visibility:p

rctx.file("installed/BUILD.bazel", """\
# Generated by aws/repositories.bzl
load("@aspect_bazel_lib//lib:tar.bzl", "mtree_spec", "tar")
load("@tar.bzl", "mtree_spec", "tar")

package(default_visibility=["//visibility:public"])

Expand Down
4 changes: 2 additions & 2 deletions examples/cli/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@aspect_bazel_lib//lib:testing.bzl", "assert_contains")
load("@aspect_bazel_lib//lib:transitions.bzl", "platform_transition_filegroup")
load("@bazel_lib//lib:testing.bzl", "assert_contains")
load("@bazel_lib//lib:transitions.bzl", "platform_transition_filegroup")
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_tarball")

# Demonstrates that you can use the CLI in a genrule.
Expand Down
2 changes: 1 addition & 1 deletion examples/release_to_s3/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template")
load("@bazel_lib//lib:expand_template.bzl", "expand_template")
load("@aspect_rules_aws//aws:defs.bzl", "s3_sync")

# Allow the destination bucket to vary depending on the stamp information
Expand Down
Loading