Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bzlmod and go deps #54

Merged
merged 1 commit into from
Sep 30, 2024
Merged
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
23 changes: 12 additions & 11 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
{
"name": "Gofmt",
"run": "bazel run @cc_mvdan_gofumpt//:gofumpt -- -lang 1.19 -w -extra $(pwd)"
"run": "bazel run @cc_mvdan_gofumpt//:gofumpt -- -w -extra $(pwd)"
},
{
"name": "Clang format",
Expand All @@ -37,11 +37,11 @@
},
{
"name": "Protobuf generation",
"run": "find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true\nbazel build $(bazel query --output=label 'kind(\"go_proto_library\", //...)')\nfind bazel-bin/pkg/proto -name '*.pb.go' | while read f; do\n cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|')\ndone\n"
"run": "if [ -d bazel-bin/pkg/proto ]; then\n find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true\n bazel build $(bazel query --output=label 'kind(\"go_proto_library\", //...)')\n find bazel-bin/pkg/proto -name '*.pb.go' | while read f; do\n cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|')\n done\nfi\n"
},
{
"name": "Embedded asset generation",
"run": "bazel build $(git grep '^[[:space:]]*//go:embed ' | sed -e 's|\\(.*\\)/.*//go:embed |//\\1:|' | sort -u)\ngit grep '^[[:space:]]*//go:embed ' | sed -e 's|\\(.*\\)/.*//go:embed |\\1/|' | while read o; do\n if [ -e \"bazel-bin/$o\" ]; then\n rm -rf \"$o\"\n cp -r \"bazel-bin/$o\" \"$o\"\n find \"$o\" -type f -exec chmod -x {} +\n fi\ndone\n"
"run": "bazel build $(git grep '^[[:space:]]*//go:embed ' | sed -e 's|\\(.*\\)/.*//go:embed |//\\1:|; s|\"||g; s| .*||' | sort -u)\ngit grep '^[[:space:]]*//go:embed ' | sed -e 's|\\(.*\\)/.*//go:embed |\\1/|' | while read o; do\n if [ -e \"bazel-bin/$o\" ]; then\n rm -rf \"$o\"\n cp -r \"bazel-bin/$o\" \"$o\"\n find \"$o\" -type f -exec chmod -x {} +\n fi\ndone\n"
},
{
"name": "Test style conformance",
Expand All @@ -61,7 +61,7 @@
},
{
"name": "linux_amd64: upload bb_browser",
"uses": "actions/upload-artifact@v2-preview",
"uses": "actions/upload-artifact@v4",
"with": {
"name": "bb_browser.linux_amd64",
"path": "bb_browser"
Expand All @@ -77,7 +77,7 @@
},
{
"name": "linux_386: upload bb_browser",
"uses": "actions/upload-artifact@v2-preview",
"uses": "actions/upload-artifact@v4",
"with": {
"name": "bb_browser.linux_386",
"path": "bb_browser"
Expand All @@ -93,7 +93,7 @@
},
{
"name": "linux_arm: upload bb_browser",
"uses": "actions/upload-artifact@v2-preview",
"uses": "actions/upload-artifact@v4",
"with": {
"name": "bb_browser.linux_arm",
"path": "bb_browser"
Expand All @@ -109,7 +109,7 @@
},
{
"name": "linux_arm64: upload bb_browser",
"uses": "actions/upload-artifact@v2-preview",
"uses": "actions/upload-artifact@v4",
"with": {
"name": "bb_browser.linux_arm64",
"path": "bb_browser"
Expand All @@ -125,7 +125,7 @@
},
{
"name": "darwin_amd64: upload bb_browser",
"uses": "actions/upload-artifact@v2-preview",
"uses": "actions/upload-artifact@v4",
"with": {
"name": "bb_browser.darwin_amd64",
"path": "bb_browser"
Expand All @@ -141,7 +141,7 @@
},
{
"name": "darwin_arm64: upload bb_browser",
"uses": "actions/upload-artifact@v2-preview",
"uses": "actions/upload-artifact@v4",
"with": {
"name": "bb_browser.darwin_arm64",
"path": "bb_browser"
Expand All @@ -157,7 +157,7 @@
},
{
"name": "freebsd_amd64: upload bb_browser",
"uses": "actions/upload-artifact@v2-preview",
"uses": "actions/upload-artifact@v4",
"with": {
"name": "bb_browser.freebsd_amd64",
"path": "bb_browser"
Expand All @@ -173,7 +173,7 @@
},
{
"name": "windows_amd64: upload bb_browser",
"uses": "actions/upload-artifact@v2-preview",
"uses": "actions/upload-artifact@v4",
"with": {
"name": "bb_browser.windows_amd64",
"path": "bb_browser.exe"
Expand All @@ -197,6 +197,7 @@
"on": {
"push": {
"branches": [
"main",
"master"
]
}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pull-requests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
{
"name": "Gofmt",
"run": "bazel run @cc_mvdan_gofumpt//:gofumpt -- -lang 1.19 -w -extra $(pwd)"
"run": "bazel run @cc_mvdan_gofumpt//:gofumpt -- -w -extra $(pwd)"
},
{
"name": "Clang format",
Expand All @@ -37,11 +37,11 @@
},
{
"name": "Protobuf generation",
"run": "find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true\nbazel build $(bazel query --output=label 'kind(\"go_proto_library\", //...)')\nfind bazel-bin/pkg/proto -name '*.pb.go' | while read f; do\n cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|')\ndone\n"
"run": "if [ -d bazel-bin/pkg/proto ]; then\n find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true\n bazel build $(bazel query --output=label 'kind(\"go_proto_library\", //...)')\n find bazel-bin/pkg/proto -name '*.pb.go' | while read f; do\n cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|')\n done\nfi\n"
},
{
"name": "Embedded asset generation",
"run": "bazel build $(git grep '^[[:space:]]*//go:embed ' | sed -e 's|\\(.*\\)/.*//go:embed |//\\1:|' | sort -u)\ngit grep '^[[:space:]]*//go:embed ' | sed -e 's|\\(.*\\)/.*//go:embed |\\1/|' | while read o; do\n if [ -e \"bazel-bin/$o\" ]; then\n rm -rf \"$o\"\n cp -r \"bazel-bin/$o\" \"$o\"\n find \"$o\" -type f -exec chmod -x {} +\n fi\ndone\n"
"run": "bazel build $(git grep '^[[:space:]]*//go:embed ' | sed -e 's|\\(.*\\)/.*//go:embed |//\\1:|; s|\"||g; s| .*||' | sort -u)\ngit grep '^[[:space:]]*//go:embed ' | sed -e 's|\\(.*\\)/.*//go:embed |\\1/|' | while read o; do\n if [ -e \"bazel-bin/$o\" ]; then\n rm -rf \"$o\"\n cp -r \"bazel-bin/$o\" \"$o\"\n find \"$o\" -type f -exec chmod -x {} +\n fi\ndone\n"
},
{
"name": "Test style conformance",
Expand Down Expand Up @@ -90,6 +90,7 @@
"on": {
"pull_request": {
"branches": [
"main",
"master"
]
}
Expand Down
6 changes: 4 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ load("@gazelle//:def.bzl", "gazelle")

# gazelle:go_naming_convention_external import
# gazelle:prefix github.com/buildbarn/bb-browser
# gazelle:resolve proto build/bazel/remote/execution/v2/remote_execution.proto @com_github_bazelbuild_remote_apis//build/bazel/remote/execution/v2:remote_execution_proto
# gazelle:resolve proto go build/bazel/remote/execution/v2/remote_execution.proto @com_github_bazelbuild_remote_apis//build/bazel/remote/execution/v2:execution
# gazelle:resolve go github.com/bazelbuild/remote-apis/build/bazel/remote/execution/v2 @bazel_remote_apis//build/bazel/remote/execution/v2:remote_execution_go_proto
# gazelle:resolve go github.com/bazelbuild/remote-apis/build/bazel/semver @bazel_remote_apis//build/bazel/semver:semver_go_proto
# gazelle:resolve proto build/bazel/remote/execution/v2/remote_execution.proto @bazel_remote_apis//build/bazel/remote/execution/v2:remote_execution_proto
# gazelle:resolve proto go build/bazel/remote/execution/v2/remote_execution.proto @bazel_remote_apis//build/bazel/remote/execution/v2:remote_execution_go_proto
# gazelle:resolve proto pkg/proto/configuration/auth/auth.proto @com_github_buildbarn_bb_storage//pkg/proto/configuration/auth:auth_proto
# gazelle:resolve proto go pkg/proto/configuration/auth/auth.proto @com_github_buildbarn_bb_storage//pkg/proto/configuration/auth
# gazelle:resolve proto pkg/proto/configuration/blobstore/blobstore.proto @com_github_buildbarn_bb_storage//pkg/proto/configuration/blobstore:blobstore_proto
Expand Down
49 changes: 17 additions & 32 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
module(name = "com_github_buildbarn_bb_browser")

bazel_dep(name = "aspect_rules_js", version = "1.39.1")
bazel_dep(name = "aspect_rules_js", version = "2.0.1")
bazel_dep(name = "bazel_remote_apis", version = "0.0.0")
bazel_dep(name = "com_github_buildbarn_bb_remote_execution")
bazel_dep(name = "com_github_buildbarn_bb_storage")
bazel_dep(name = "com_github_buildbarn_go_xdr")
bazel_dep(name = "gazelle", version = "0.35.0")
bazel_dep(name = "protobuf", version = "23.1")
bazel_dep(name = "rules_go", version = "0.46.0")
bazel_dep(name = "rules_jsonnet", version = "0.5.0")
bazel_dep(name = "rules_proto", version = "6.0.0-rc2")
bazel_dep(name = "toolchains_llvm", version = "1.0.0")
bazel_dep(name = "gazelle", version = "0.38.0")
bazel_dep(name = "protobuf", version = "28.1")
bazel_dep(name = "rules_go", version = "0.50.1")
bazel_dep(name = "rules_jsonnet", version = "0.6.0")
bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "toolchains_llvm", version = "1.1.2")

git_override(
module_name = "bazel_remote_apis",
commit = "6777112ef7defa6705b1ebd2831d6c7efeb12ba2",
remote = "https://github.com/bazelbuild/remote-apis.git",
)

git_override(
module_name = "com_github_buildbarn_bb_remote_execution",
commit = "ea22f37f62b885026ad9e1aa0d62deb15dbb454a",
commit = "853626adcafd25a948f90b05a251bfba9a0e236f",
remote = "https://github.com/buildbarn/bb-remote-execution.git",
)

git_override(
module_name = "com_github_buildbarn_bb_storage",
commit = "118cb9ca2a7df1cbac6d51c7f1cc3156cae06446",
commit = "8abbcfab01bcde294b20c2070baba9fd242bab7f",
remote = "https://github.com/buildbarn/bb-storage.git",
)

git_override(
module_name = "com_github_buildbarn_go_xdr",
commit = "9cb8426d3e09e301c2b12c993e54ef795a665a92",
commit = "236788cf9e8948a1e8875c7dd243e2be180cdfd7",
remote = "https://github.com/buildbarn/go-xdr.git",
)

git_override(
module_name = "gazelle",
commit = "f5a5c5dc90b4d6a39f0f47d770eba27c6c1c1877",
patches = ["//:patches/gazelle/googleapis.diff"],
remote = "https://github.com/bazelbuild/bazel-gazelle.git",
)

git_override(
module_name = "rules_antlr",
commit = "89a29cca479363a5aee53e203719510bdc6be6ff",
Expand All @@ -52,7 +52,6 @@ use_repo(
go_deps,
"cc_mvdan_gofumpt",
"com_github_bazelbuild_buildtools",
"com_github_bazelbuild_remote_apis",
"com_github_buildkite_terminal_to_html",
"com_github_dustin_go_humanize",
"com_github_gorilla_mux",
Expand All @@ -65,20 +64,6 @@ use_repo(
)

go_deps_dev = use_extension("@gazelle//:extensions.bzl", "go_deps", dev_dependency = True)
go_deps_dev.gazelle_override(
build_file_generation = "on",
directives = [
"gazelle:go_grpc_compilers @io_bazel_rules_go//proto:go_proto,@io_bazel_rules_go//proto:go_grpc_v2",
"gazelle:resolve proto go build/bazel/semver/semver.proto //build/bazel/semver",
"gazelle:resolve proto go google/api/annotations.proto @org_golang_google_genproto_googleapis_api//annotations",
"gazelle:resolve proto go google/longrunning/operations.proto @com_google_cloud_go_longrunning//autogen/longrunningpb",
"gazelle:resolve proto go google/rpc/status.proto @org_golang_google_genproto_googleapis_rpc//status",
"gazelle:resolve proto google/api/annotations.proto @googleapis//google/api:annotations_proto",
"gazelle:resolve proto google/longrunning/operations.proto @googleapis//google/longrunning:operations_proto",
"gazelle:resolve proto google/rpc/status.proto @googleapis//google/rpc:status_proto",
],
path = "github.com/bazelbuild/remote-apis",
)
go_deps_dev.module_override(
patches = ["//:patches/com_github_buildkite_terminal_to_html/assets.diff"],
path = "github.com/buildkite/terminal-to-html",
Expand Down
Loading