diff --git a/BUILD.bazel b/BUILD.bazel index e04b88e..374b349 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,5 +1,5 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") -load("@bazel_gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle", "gazelle_binary") +load("@gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle", "gazelle_binary") load("//oci:toolchain.bzl", "oci_local_toolchain") # gazelle:prefix github.com/DataDog/rules_oci @@ -24,7 +24,7 @@ gazelle_binary( alias( name = "go", - actual = "@io_bazel_rules_go//go", + actual = "@rules_go//go", ) write_source_files( diff --git a/MODULE.bazel b/MODULE.bazel index 15be8f9..17a7b60 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -6,18 +6,18 @@ module( bazel_dep(name = "aspect_bazel_lib", version = "2.7.3") bazel_dep(name = "bazel_skylib", version = "1.6.1") bazel_dep(name = "bazel_skylib_gazelle_plugin", dev_dependency = True, version = "1.6.1") -bazel_dep(name = "gazelle", repo_name = "bazel_gazelle", version = "0.36.0") -bazel_dep(name = "rules_go", repo_name = "io_bazel_rules_go", version = "0.47.1") +bazel_dep(name = "gazelle", version = "0.36.0") +bazel_dep(name = "rules_go", version = "0.47.1") bazel_dep(name = "rules_pkg", version = "0.10.1") -bazel_dep(name = "stardoc", repo_name = "io_bazel_stardoc", version = "0.6.2") +bazel_dep(name = "stardoc", version = "0.6.2") -go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") +go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") go_sdk.download(version = "1.22.2") go_sdk.host() -go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") +go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") go_deps.from_file(go_mod = "//:go.mod") diff --git a/go/cmd/ocitool/BUILD.bazel b/go/cmd/ocitool/BUILD.bazel index 0a7de52..ca2079e 100644 --- a/go/cmd/ocitool/BUILD.bazel +++ b/go/cmd/ocitool/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") +load("@rules_go//go:def.bzl", "go_binary", "go_library") go_library( name = "go_default_library", @@ -25,7 +25,6 @@ go_library( "//go/pkg/jsonutil:go_default_library", "//go/pkg/layer:go_default_library", "//go/pkg/ociutil:go_default_library", - "@bazel_gazelle//rule:go_default_library", "@com_github_containerd_containerd//content:go_default_library", "@com_github_containerd_containerd//images:go_default_library", "@com_github_containerd_containerd//platforms:go_default_library", @@ -34,6 +33,7 @@ go_library( "@com_github_opencontainers_image_spec//specs-go/v1:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli_v2//:go_default_library", + "@gazelle//rule:go_default_library", "@land_oras_oras_go//pkg/content:go_default_library", "@org_golang_x_sync//semaphore:go_default_library", ], diff --git a/go/internal/flagutil/BUILD.bazel b/go/internal/flagutil/BUILD.bazel index b0ea088..2b0b47a 100644 --- a/go/internal/flagutil/BUILD.bazel +++ b/go/internal/flagutil/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", diff --git a/go/internal/set/BUILD.bazel b/go/internal/set/BUILD.bazel index 62fffba..c7422bc 100644 --- a/go/internal/set/BUILD.bazel +++ b/go/internal/set/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", diff --git a/go/internal/tarutil/BUILD.bazel b/go/internal/tarutil/BUILD.bazel index e3c34fc..82fa30d 100644 --- a/go/internal/tarutil/BUILD.bazel +++ b/go/internal/tarutil/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", diff --git a/go/pkg/blob/BUILD.bazel b/go/pkg/blob/BUILD.bazel index 264ca30..8988fd4 100644 --- a/go/pkg/blob/BUILD.bazel +++ b/go/pkg/blob/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", diff --git a/go/pkg/credhelper/BUILD.bazel b/go/pkg/credhelper/BUILD.bazel index 2351d3b..dc4de28 100644 --- a/go/pkg/credhelper/BUILD.bazel +++ b/go/pkg/credhelper/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", diff --git a/go/pkg/deb2layer/BUILD.bazel b/go/pkg/deb2layer/BUILD.bazel index f8bec80..6618e70 100644 --- a/go/pkg/deb2layer/BUILD.bazel +++ b/go/pkg/deb2layer/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") +load("@rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", diff --git a/go/pkg/jsonutil/BUILD.bazel b/go/pkg/jsonutil/BUILD.bazel index 9f7d756..419502d 100644 --- a/go/pkg/jsonutil/BUILD.bazel +++ b/go/pkg/jsonutil/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", diff --git a/go/pkg/layer/BUILD.bazel b/go/pkg/layer/BUILD.bazel index 9e9d438..2cc644c 100644 --- a/go/pkg/layer/BUILD.bazel +++ b/go/pkg/layer/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", diff --git a/go/pkg/ociutil/BUILD.bazel b/go/pkg/ociutil/BUILD.bazel index b2377bb..56b1a0a 100644 --- a/go/pkg/ociutil/BUILD.bazel +++ b/go/pkg/ociutil/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", @@ -26,7 +26,6 @@ go_library( deps = [ "//go/internal/set:go_default_library", "//go/pkg/credhelper:go_default_library", - "@bazel_gazelle//rule:go_default_library", "@com_github_containerd_containerd//content:go_default_library", "@com_github_containerd_containerd//errdefs:go_default_library", "@com_github_containerd_containerd//images:go_default_library", @@ -37,6 +36,7 @@ go_library( "@com_github_opencontainers_go_digest//:go_default_library", "@com_github_opencontainers_image_spec//specs-go/v1:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", + "@gazelle//rule:go_default_library", "@land_oras_oras_go//pkg/oras:go_default_library", ], ) diff --git a/release/release.bzl b/release/release.bzl index c3638f2..87f210f 100644 --- a/release/release.bzl +++ b/release/release.bzl @@ -1,5 +1,5 @@ load("@rules_pkg//pkg:pkg.bzl", "pkg_tar") -load("@io_bazel_rules_go//go:def.bzl", "go_binary") +load("@rules_go//go:def.bzl", "go_binary") DEFAULT_GOOSS = ["linux", "darwin"] DEFAULT_GOARCHS = ["amd64", "arm64"] diff --git a/tests/go-multiarch-image/BUILD.bazel b/tests/go-multiarch-image/BUILD.bazel index d28ef6f..d961309 100644 --- a/tests/go-multiarch-image/BUILD.bazel +++ b/tests/go-multiarch-image/BUILD.bazel @@ -1,6 +1,6 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("@com_github_datadog_rules_oci//oci:defs.bzl", "oci_push") -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") +load("@rules_go//go:def.bzl", "go_binary", "go_library") load(":go.bzl", "go_multiarch_image") go_library( @@ -40,6 +40,6 @@ bzl_library( visibility = ["//visibility:public"], deps = [ "@com_github_datadog_rules_oci//oci:defs", - "@io_bazel_rules_go//go:def", + "@rules_go//go:def", ], ) diff --git a/tests/go-multiarch-image/go.bzl b/tests/go-multiarch-image/go.bzl index 8b3d2ef..ea6a33a 100644 --- a/tests/go-multiarch-image/go.bzl +++ b/tests/go-multiarch-image/go.bzl @@ -1,5 +1,5 @@ load("@com_github_datadog_rules_oci//oci:defs.bzl", "oci_image", "oci_image_index", "oci_image_layer") -load("@io_bazel_rules_go//go:def.bzl", "go_binary") +load("@rules_go//go:def.bzl", "go_binary") def go_multiarch_image(name, base, archs, binary_name = "", binary_dir = "/app", **kwargs): """