Skip to content

Commit 355ac82

Browse files
committed
revert to using old name for rules_go
1 parent 8052fed commit 355ac82

File tree

76 files changed

+148
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+148
-146
lines changed

.bazelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ build:osx --define gotags=sqlite_modernc
2929
test --build_tests_only --print_relative_test_log_paths --test_output=errors --nobuild_python_zip --spawn_strategy=remote,worker,processwrapper-sandbox,local
3030

3131
### predefined configurations (use with --config, eg. `bazel test --config=unit_all`)
32-
test:race --@rules_go//go/config:race
32+
test:race --@io_bazel_rules_go//go/config:race
3333
test:unit --test_tag_filters=unit
3434
test:unit_all --config=unit //...
3535

BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag")
22
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
33
load("@gazelle//:def.bzl", "gazelle")
44
load("@npm//private/mgmtapi/tools:@stoplight/spectral-cli/package_json.bzl", spectral_bin = "bin")
5-
load("@rules_go//go:def.bzl", "nogo")
5+
load("@io_bazel_rules_go//go:def.bzl", "nogo")
66
load("@rules_pkg//:pkg.bzl", "pkg_tar")
77
load("//:nogo.bzl", "nogo_deps")
88
load("//tools/lint:go_config.bzl", "go_lint_config")

MODULE.bazel

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ linter.configure(
2020
use_repo(linter, "apple_linters")
2121

2222
# Bazel rules for Golang
23-
bazel_dep(name = "rules_go", version = "0.53.0")
23+
bazel_dep(name = "rules_go", version = "0.53.0", repo_name = "io_bazel_rules_go") # have to use the old name as buildtools still use it
2424
single_version_override(
2525
module_name = "rules_go",
26-
patches = ["//patches:rules_go/import.patch"],
26+
patches = ["//patches:io_bazel_rules_go/import.patch"],
2727
)
2828

29-
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
29+
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
3030
go_sdk.download(version = "1.24.0")
3131
use_repo(go_sdk, "go_toolchains")
3232

@@ -216,3 +216,4 @@ bazel_dep(name = "aspect_bazel_lib", version = "2.13.0")
216216
bazel_dep(name = "rules_proto", version = "7.1.0")
217217
bazel_dep(name = "rules_proto_grpc", version = "5.0.1")
218218
bazel_dep(name = "protobuf", version = "29.3")
219+
bazel_dep(name = "rules_shell", version = "0.4.0")

MODULE.bazel.lock

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ test-integration:
6363
bazel test --config=integration_all
6464

6565
go.mod:
66-
bazel run --config=quiet @rules_go//go -- mod tidy
66+
bazel run --config=quiet @io_bazel_rules_go//go -- mod tidy
6767

6868
docker-images:
6969
@echo "Build images"
@@ -90,8 +90,8 @@ licenses:
9090

9191
antlr:
9292
antlr/generate.sh fix
93-
bazel run @rules_go//go -- fmt antlr/sequence/*.go
94-
bazel run @rules_go//go -- fmt antlr/traffic_class/*.go
93+
bazel run @io_bazel_rules_go//go -- fmt antlr/sequence/*.go
94+
bazel run @io_bazel_rules_go//go -- fmt antlr/traffic_class/*.go
9595

9696
write_all_source_files:
9797
bazel run //:write_all_source_files

acceptance/router_benchmark/brload/BUILD.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ go_library(
1010
importpath = "github.com/scionproto/scion/acceptance/router_benchmark/brload",
1111
visibility = ["//visibility:private"],
1212
deps = select({
13-
"@rules_go//go/platform:android": [
13+
"@io_bazel_rules_go//go/platform:android": [
1414
"//acceptance/router_benchmark/cases:go_default_library",
1515
"//pkg/log:go_default_library",
1616
"//pkg/private/serrors:go_default_library",
@@ -23,7 +23,7 @@ go_library(
2323
"@com_github_spf13_cobra//:go_default_library",
2424
"@org_golang_x_sys//unix:go_default_library",
2525
],
26-
"@rules_go//go/platform:linux": [
26+
"@io_bazel_rules_go//go/platform:linux": [
2727
"//acceptance/router_benchmark/cases:go_default_library",
2828
"//pkg/log:go_default_library",
2929
"//pkg/private/serrors:go_default_library",

acceptance/topo_cs_reload/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ go_test(
3131
"//private/topology:go_default_library",
3232
"@com_github_stretchr_testify//assert:go_default_library",
3333
"@com_github_stretchr_testify//require:go_default_library",
34-
"@rules_go//go/tools/bazel:go_default_library",
34+
"@io_bazel_rules_go//go/tools/bazel:go_default_library",
3535
],
3636
)
3737

control/beacon/mock_beacon/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

control/beaconing/mock_beaconing/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

control/drkey/grpc/mock_grpc/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

control/drkey/mock_drkey/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

control/mgmtapi/mock_mgmtapi/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

control/trust/mock_trust/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

daemon/fetcher/mock_fetcher/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

demo/drkey/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "go_binary")
1+
load("@io_bazel_rules_go//go:def.bzl", "go_binary")
22
load("//:scion.bzl", "scion_go_binary")
33
load("//acceptance/common:topogen.bzl", "topogen_test")
44
load("//tools/lint:go.bzl", "go_library")

dispatcher/cmd/dispatcher/BUILD.bazel

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ go_library(
77
importpath = "github.com/scionproto/scion/dispatcher/cmd/dispatcher",
88
visibility = ["//visibility:private"],
99
deps = select({
10-
"@rules_go//go/platform:android": [
10+
"@io_bazel_rules_go//go/platform:android": [
1111
"//dispatcher:go_default_library",
1212
"//dispatcher/config:go_default_library",
1313
"//dispatcher/mgmtapi:go_default_library",
@@ -23,7 +23,7 @@ go_library(
2323
"@com_github_go_chi_cors//:go_default_library",
2424
"@org_golang_x_sync//errgroup:go_default_library",
2525
],
26-
"@rules_go//go/platform:darwin": [
26+
"@io_bazel_rules_go//go/platform:darwin": [
2727
"//dispatcher:go_default_library",
2828
"//dispatcher/config:go_default_library",
2929
"//dispatcher/mgmtapi:go_default_library",
@@ -39,7 +39,7 @@ go_library(
3939
"@com_github_go_chi_cors//:go_default_library",
4040
"@org_golang_x_sync//errgroup:go_default_library",
4141
],
42-
"@rules_go//go/platform:ios": [
42+
"@io_bazel_rules_go//go/platform:ios": [
4343
"//dispatcher:go_default_library",
4444
"//dispatcher/config:go_default_library",
4545
"//dispatcher/mgmtapi:go_default_library",
@@ -55,7 +55,7 @@ go_library(
5555
"@com_github_go_chi_cors//:go_default_library",
5656
"@org_golang_x_sync//errgroup:go_default_library",
5757
],
58-
"@rules_go//go/platform:linux": [
58+
"@io_bazel_rules_go//go/platform:linux": [
5959
"//dispatcher:go_default_library",
6060
"//dispatcher/config:go_default_library",
6161
"//dispatcher/mgmtapi:go_default_library",

dist/BUILD.bazel

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ load(":package.bzl", "scion_pkg_deb", "scion_pkg_ipk", "scion_pkg_rpm")
33
load(":platform.bzl", "multiplatform_filegroup")
44

55
DEB_PLATFORMS = [
6-
"@rules_go//go/toolchain:linux_amd64",
7-
"@rules_go//go/toolchain:linux_arm64",
8-
"@rules_go//go/toolchain:linux_386",
9-
"@rules_go//go/toolchain:linux_arm",
6+
"@io_bazel_rules_go//go/toolchain:linux_amd64",
7+
"@io_bazel_rules_go//go/toolchain:linux_arm64",
8+
"@io_bazel_rules_go//go/toolchain:linux_386",
9+
"@io_bazel_rules_go//go/toolchain:linux_arm",
1010
]
1111

1212
RPM_PLATFORMS = [
13-
"@rules_go//go/toolchain:linux_amd64",
14-
"@rules_go//go/toolchain:linux_arm64",
15-
"@rules_go//go/toolchain:linux_386",
16-
"@rules_go//go/toolchain:linux_arm",
13+
"@io_bazel_rules_go//go/toolchain:linux_amd64",
14+
"@io_bazel_rules_go//go/toolchain:linux_arm64",
15+
"@io_bazel_rules_go//go/toolchain:linux_386",
16+
"@io_bazel_rules_go//go/toolchain:linux_arm",
1717
]
1818

1919
# TODO(jice@scion.org):

doc/dev/dependencies.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ the dependencies are stored in the ``go.sum`` file.
1212
When building with Bazel, all external dependencies are managed with ``go_deps``
1313
extension in the MODULES file.
1414
All direct Go dependencies of the module have to be listed explicitly.
15-
The @rules_go//go target automatically updates the ``use_repo`` call
15+
The @io_bazel_rules_go//go target automatically updates the ``use_repo`` call
1616
whenever the ``go.mod`` file changes by using ``bazel mod tidy``.
1717

1818
Workflow to modify dependencies

doc/dev/testing/mocks.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ directory ``go/lib/foo``. First, you need to create the subdirectory
1414
``BUILD.bazel``. We need to add a ``gomock`` target in this ``BUILD.bazel`` file for our
1515
interfaces. This would look like the following::
1616

17-
load("@rules_go//go:def.bzl", "gomock")
17+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
1818
gomock(
1919
name = "go_default_mock",
2020
out = "mock.go",

gateway/control/grpc/mock_grpc/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

gateway/control/mock_control/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

gateway/mock_gateway/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

gateway/pktcls/mock_pktcls/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

gateway/routing/mock_routing/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(
File renamed without changes.

pkg/daemon/mock_daemon/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

pkg/experimental/hiddenpath/grpc/mock_grpc/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

pkg/experimental/hiddenpath/mock_hiddenpath/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

pkg/log/mock_log/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

pkg/metrics/mock_metrics/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

pkg/private/mocks/io/mock_io/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

pkg/private/mocks/net/mock_net/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

pkg/private/processmetrics/BUILD.bazel

+16-16
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,56 @@ go_library(
99
importpath = "github.com/scionproto/scion/pkg/private/processmetrics",
1010
visibility = ["//visibility:public"],
1111
deps = select({
12-
"@rules_go//go/platform:aix": [
12+
"@io_bazel_rules_go//go/platform:aix": [
1313
"//pkg/private/serrors:go_default_library",
1414
],
15-
"@rules_go//go/platform:android": [
15+
"@io_bazel_rules_go//go/platform:android": [
1616
"//pkg/private/serrors:go_default_library",
1717
"@com_github_prometheus_client_golang//prometheus:go_default_library",
1818
"@com_github_prometheus_procfs//:go_default_library",
1919
],
20-
"@rules_go//go/platform:darwin": [
20+
"@io_bazel_rules_go//go/platform:darwin": [
2121
"//pkg/private/serrors:go_default_library",
2222
],
23-
"@rules_go//go/platform:dragonfly": [
23+
"@io_bazel_rules_go//go/platform:dragonfly": [
2424
"//pkg/private/serrors:go_default_library",
2525
],
26-
"@rules_go//go/platform:freebsd": [
26+
"@io_bazel_rules_go//go/platform:freebsd": [
2727
"//pkg/private/serrors:go_default_library",
2828
],
29-
"@rules_go//go/platform:illumos": [
29+
"@io_bazel_rules_go//go/platform:illumos": [
3030
"//pkg/private/serrors:go_default_library",
3131
],
32-
"@rules_go//go/platform:ios": [
32+
"@io_bazel_rules_go//go/platform:ios": [
3333
"//pkg/private/serrors:go_default_library",
3434
],
35-
"@rules_go//go/platform:js": [
35+
"@io_bazel_rules_go//go/platform:js": [
3636
"//pkg/private/serrors:go_default_library",
3737
],
38-
"@rules_go//go/platform:linux": [
38+
"@io_bazel_rules_go//go/platform:linux": [
3939
"//pkg/private/serrors:go_default_library",
4040
"@com_github_prometheus_client_golang//prometheus:go_default_library",
4141
"@com_github_prometheus_procfs//:go_default_library",
4242
],
43-
"@rules_go//go/platform:netbsd": [
43+
"@io_bazel_rules_go//go/platform:netbsd": [
4444
"//pkg/private/serrors:go_default_library",
4545
],
46-
"@rules_go//go/platform:openbsd": [
46+
"@io_bazel_rules_go//go/platform:openbsd": [
4747
"//pkg/private/serrors:go_default_library",
4848
],
49-
"@rules_go//go/platform:osx": [
49+
"@io_bazel_rules_go//go/platform:osx": [
5050
"//pkg/private/serrors:go_default_library",
5151
],
52-
"@rules_go//go/platform:plan9": [
52+
"@io_bazel_rules_go//go/platform:plan9": [
5353
"//pkg/private/serrors:go_default_library",
5454
],
55-
"@rules_go//go/platform:qnx": [
55+
"@io_bazel_rules_go//go/platform:qnx": [
5656
"//pkg/private/serrors:go_default_library",
5757
],
58-
"@rules_go//go/platform:solaris": [
58+
"@io_bazel_rules_go//go/platform:solaris": [
5959
"//pkg/private/serrors:go_default_library",
6060
],
61-
"@rules_go//go/platform:windows": [
61+
"@io_bazel_rules_go//go/platform:windows": [
6262
"//pkg/private/serrors:go_default_library",
6363
],
6464
"//conditions:default": [],

pkg/proto/control_plane/BUILD.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
load("@rules_go//proto:def.bzl", "go_proto_library")
1+
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
22

33
go_proto_library(
44
name = "go_default_library",
5-
compiler = "@rules_go//proto:go_grpc",
5+
compiler = "@io_bazel_rules_go//proto:go_grpc",
66
importpath = "github.com/scionproto/scion/pkg/proto/control_plane",
77
proto = "//proto/control_plane/v1:control_plane",
88
visibility = ["//visibility:public"],

pkg/proto/control_plane/experimental/BUILD.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
load("@rules_go//proto:def.bzl", "go_proto_library")
1+
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
22

33
go_proto_library(
44
name = "go_default_library",
5-
compiler = "@rules_go//proto:go_grpc",
5+
compiler = "@io_bazel_rules_go//proto:go_grpc",
66
importpath = "github.com/scionproto/scion/pkg/proto/control_plane/experimental",
77
proto = "//proto/control_plane/experimental/v1:experimental",
88
visibility = ["//visibility:public"],

pkg/proto/control_plane/mock_control_plane/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_go//go:def.bzl", "gomock")
1+
load("@io_bazel_rules_go//go:def.bzl", "gomock")
22
load("//tools/lint:go.bzl", "go_library")
33

44
gomock(

0 commit comments

Comments
 (0)