Skip to content

Commit 6f73578

Browse files
committed
Switch to a Module
1 parent 83e9a24 commit 6f73578

File tree

24 files changed

+19353
-2349
lines changed

24 files changed

+19353
-2349
lines changed

.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.0.0
1+
7.1.1

.github/workflows/master.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -73,35 +73,35 @@
7373
},
7474
{
7575
"name": "linux_amd64: build and test",
76-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //..."
76+
"run": "bazel build --platforms=@rules_go//go/toolchain:linux_amd64 //..."
7777
},
7878
{
7979
"name": "linux_386: build and test",
80-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_386 //..."
80+
"run": "bazel build --platforms=@rules_go//go/toolchain:linux_386 //..."
8181
},
8282
{
8383
"name": "linux_arm: build and test",
84-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_arm //..."
84+
"run": "bazel build --platforms=@rules_go//go/toolchain:linux_arm //..."
8585
},
8686
{
8787
"name": "linux_arm64: build and test",
88-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64 //..."
88+
"run": "bazel build --platforms=@rules_go//go/toolchain:linux_arm64 //..."
8989
},
9090
{
9191
"name": "darwin_amd64: build and test",
92-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64 //..."
92+
"run": "bazel build --platforms=@rules_go//go/toolchain:darwin_amd64 //..."
9393
},
9494
{
9595
"name": "darwin_arm64: build and test",
96-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:darwin_arm64 //..."
96+
"run": "bazel build --platforms=@rules_go//go/toolchain:darwin_arm64 //..."
9797
},
9898
{
9999
"name": "freebsd_amd64: build and test",
100-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:freebsd_amd64 //..."
100+
"run": "bazel build --platforms=@rules_go//go/toolchain:freebsd_amd64 //..."
101101
},
102102
{
103103
"name": "windows_amd64: build and test",
104-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:windows_amd64 //..."
104+
"run": "bazel build --platforms=@rules_go//go/toolchain:windows_amd64 //..."
105105
}
106106
]
107107
}

.github/workflows/pull-requests.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -73,35 +73,35 @@
7373
},
7474
{
7575
"name": "linux_amd64: build and test",
76-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //..."
76+
"run": "bazel build --platforms=@rules_go//go/toolchain:linux_amd64 //..."
7777
},
7878
{
7979
"name": "linux_386: build and test",
80-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_386 //..."
80+
"run": "bazel build --platforms=@rules_go//go/toolchain:linux_386 //..."
8181
},
8282
{
8383
"name": "linux_arm: build and test",
84-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_arm //..."
84+
"run": "bazel build --platforms=@rules_go//go/toolchain:linux_arm //..."
8585
},
8686
{
8787
"name": "linux_arm64: build and test",
88-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64 //..."
88+
"run": "bazel build --platforms=@rules_go//go/toolchain:linux_arm64 //..."
8989
},
9090
{
9191
"name": "darwin_amd64: build and test",
92-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64 //..."
92+
"run": "bazel build --platforms=@rules_go//go/toolchain:darwin_amd64 //..."
9393
},
9494
{
9595
"name": "darwin_arm64: build and test",
96-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:darwin_arm64 //..."
96+
"run": "bazel build --platforms=@rules_go//go/toolchain:darwin_arm64 //..."
9797
},
9898
{
9999
"name": "freebsd_amd64: build and test",
100-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:freebsd_amd64 //..."
100+
"run": "bazel build --platforms=@rules_go//go/toolchain:freebsd_amd64 //..."
101101
},
102102
{
103103
"name": "windows_amd64: build and test",
104-
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:windows_amd64 //..."
104+
"run": "bazel build --platforms=@rules_go//go/toolchain:windows_amd64 //..."
105105
}
106106
]
107107
}

BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@bazel_gazelle//:def.bzl", "gazelle")
1+
load("@gazelle//:def.bzl", "gazelle")
22
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
33

44
# gazelle:prefix github.com/buildbarn/bb-deployments

MODULE.bazel

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
module(name = "com_github_buildbarn_bb_deployments")
2+
3+
bazel_dep(name = "aspect_bazel_lib", version = "2.6.0")
4+
bazel_dep(name = "aspect_rules_js", version = "1.39.1")
5+
bazel_dep(name = "com_github_buildbarn_bb_browser")
6+
bazel_dep(name = "com_github_buildbarn_bb_remote_execution")
7+
bazel_dep(name = "com_github_buildbarn_bb_storage")
8+
bazel_dep(name = "com_github_buildbarn_go_xdr")
9+
bazel_dep(name = "gazelle", version = "0.35.0")
10+
bazel_dep(name = "googleapis", version = "0.0.0-20240326-1c8d509c5")
11+
bazel_dep(name = "jsonnet_go", version = "0.20.0")
12+
bazel_dep(name = "opentelemetry-proto", version = "1.1.0")
13+
bazel_dep(name = "protobuf", version = "23.1")
14+
bazel_dep(name = "rules_antlr")
15+
bazel_dep(name = "rules_go", version = "0.46.0")
16+
bazel_dep(name = "rules_jsonnet", version = "0.6.0")
17+
bazel_dep(name = "rules_oci", version = "1.7.5")
18+
bazel_dep(name = "rules_pkg", version = "0.10.1")
19+
bazel_dep(name = "rules_proto", version = "6.0.0-rc2")
20+
bazel_dep(name = "toolchains_llvm", version = "1.0.0")
21+
22+
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
23+
24+
http_archive(
25+
name = "grafonnet_lib",
26+
build_file_content = """
27+
load("@rules_jsonnet//jsonnet:jsonnet.bzl", "jsonnet_library")
28+
29+
jsonnet_library(
30+
name = "grafonnet",
31+
srcs = glob(["grafonnet/*.libsonnet"]),
32+
imports = ["."],
33+
visibility = ["//visibility:public"],
34+
)
35+
""",
36+
sha256 = "ef8d75ab8633024f0a214f61e28ca8a5fe384467ce1151587eb812ddf7181e76",
37+
strip_prefix = "grafonnet-lib-04f3e87e2d524c7aba936aae525f388290d94291",
38+
urls = ["https://github.com/grafana/grafonnet-lib/archive/04f3e87e2d524c7aba936aae525f388290d94291.tar.gz"],
39+
)
40+
41+
git_override(
42+
module_name = "com_github_buildbarn_bb_browser",
43+
commit = "a644003a557767c736d8b45c9a50e1faf9c2e024",
44+
remote = "https://github.com/buildbarn/bb-browser.git",
45+
)
46+
47+
git_override(
48+
module_name = "com_github_buildbarn_bb_remote_execution",
49+
commit = "ea22f37f62b885026ad9e1aa0d62deb15dbb454a",
50+
remote = "https://github.com/buildbarn/bb-remote-execution.git",
51+
)
52+
53+
git_override(
54+
module_name = "com_github_buildbarn_bb_storage",
55+
commit = "a9d0937955fc44f23434b450608c9ebc8405ab05",
56+
remote = "https://github.com/buildbarn/bb-storage.git",
57+
)
58+
59+
git_override(
60+
module_name = "com_github_buildbarn_go_xdr",
61+
commit = "9cb8426d3e09e301c2b12c993e54ef795a665a92",
62+
remote = "https://github.com/buildbarn/go-xdr.git",
63+
)
64+
65+
git_override(
66+
module_name = "rules_antlr",
67+
commit = "89a29cca479363a5aee53e203719510bdc6be6ff",
68+
patches = [
69+
"//:patches/rules_antlr/antlr-4.10.diff",
70+
"//:patches/rules_antlr/bzlmod.diff",
71+
],
72+
remote = "https://github.com/marcohu/rules_antlr.git",
73+
)
74+
75+
git_override(
76+
module_name = "gazelle",
77+
commit = "f5a5c5dc90b4d6a39f0f47d770eba27c6c1c1877",
78+
patches = [
79+
"//:patches/gazelle/dont-flatten-srcs.diff",
80+
"//:patches/gazelle/googleapis.diff",
81+
],
82+
remote = "https://github.com/bazelbuild/bazel-gazelle.git",
83+
)
84+
85+
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
86+
go_sdk.download(version = "1.22.1")
87+
88+
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
89+
go_deps.from_file(go_mod = "//:go.mod")
90+
use_repo(
91+
go_deps,
92+
"cc_mvdan_gofumpt",
93+
)
94+
95+
go_deps_dev = use_extension("@gazelle//:extensions.bzl", "go_deps", dev_dependency = True)
96+
go_deps_dev.module_override(
97+
patches = ["//:patches/com_github_buildkite_terminal_to_html/assets.diff"],
98+
path = "github.com/buildkite/terminal-to-html",
99+
)
100+
go_deps_dev.gazelle_override(
101+
build_file_generation = "on",
102+
directives = [
103+
"gazelle:go_grpc_compilers @io_bazel_rules_go//proto:go_proto,@io_bazel_rules_go//proto:go_grpc_v2",
104+
"gazelle:resolve proto go build/bazel/semver/semver.proto //build/bazel/semver",
105+
"gazelle:resolve proto go google/api/annotations.proto @org_golang_google_genproto_googleapis_api//annotations",
106+
"gazelle:resolve proto go google/longrunning/operations.proto @com_google_cloud_go_longrunning//autogen/longrunningpb",
107+
"gazelle:resolve proto go google/rpc/status.proto @org_golang_google_genproto_googleapis_rpc//status",
108+
"gazelle:resolve proto google/api/annotations.proto @googleapis//google/api:annotations_proto",
109+
"gazelle:resolve proto google/longrunning/operations.proto @googleapis//google/longrunning:operations_proto",
110+
"gazelle:resolve proto google/rpc/status.proto @googleapis//google/rpc:status_proto",
111+
],
112+
path = "github.com/bazelbuild/remote-apis",
113+
)
114+
go_deps_dev.module_override(
115+
patches = ["//:patches/org_golang_google_genproto_googleapis_bytestream/service-registrar.diff"],
116+
path = "google.golang.org/genproto/googleapis/bytestream",
117+
)
118+
go_deps_dev.module_override(
119+
patches = [
120+
"//:patches/com_github_hanwen_go_fuse_v2/direntrylist-offsets-and-testability.diff",
121+
"//:patches/com_github_hanwen_go_fuse_v2/writeback-cache.diff",
122+
"//:patches/com_github_hanwen_go_fuse_v2/notify-testability.diff",
123+
],
124+
path = "github.com/hanwen/go-fuse/v2",
125+
)

0 commit comments

Comments
 (0)