Skip to content

Commit

Permalink
Use bzlmod names instead of legacy workspace names
Browse files Browse the repository at this point in the history
  • Loading branch information
guyboltonking committed Aug 16, 2024
1 parent b9a3336 commit c943ccd
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -24,7 +24,7 @@ gazelle_binary(

alias(
name = "go",
actual = "@io_bazel_rules_go//go",
actual = "@rules_go//go",
)

write_source_files(
Expand Down
10 changes: 5 additions & 5 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
4 changes: 2 additions & 2 deletions go/cmd/ocitool/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand All @@ -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",
],
Expand Down
2 changes: 1 addition & 1 deletion go/internal/flagutil/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion go/internal/set/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion go/internal/tarutil/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion go/pkg/blob/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion go/pkg/credhelper/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion go/pkg/deb2layer/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion go/pkg/jsonutil/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion go/pkg/layer/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions go/pkg/ociutil/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
],
)
2 changes: 1 addition & 1 deletion release/release.bzl
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions tests/go-multiarch-image/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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(
Expand Down Expand Up @@ -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",
],
)
2 changes: 1 addition & 1 deletion tests/go-multiarch-image/go.bzl
Original file line number Diff line number Diff line change
@@ -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):
"""
Expand Down

0 comments on commit c943ccd

Please sign in to comment.