Skip to content

Commit 7bac0ca

Browse files
committed
Upgrade Bazel -> 5.3.1
1 parent ec3f195 commit 7bac0ca

13 files changed

Lines changed: 154 additions & 121 deletions

File tree

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.0
1+
5.3.1

.github/workflows/buf.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ jobs:
1111
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # renovate: tag=v2
1212

1313
# 2: Setup Buf.
14-
- uses: bufbuild/buf-setup-action@v0.3.1
14+
- uses: bufbuild/buf-setup-action@v1.8.0
1515
with:
16-
version: '0.54.1'
16+
github_token: ${{ github.token }}
1717

1818
# 3: Run linter.
19-
- uses: bufbuild/buf-lint-action@v0.3.0
20-
with:
21-
github_token: ${{ github.token }}
19+
- uses: bufbuild/buf-lint-action@v1
2220

2321
proto-breaking:
2422
runs-on: ubuntu-latest
@@ -28,16 +26,37 @@ jobs:
2826
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # renovate: tag=v2
2927

3028
# 2: Setup Buf.
31-
- uses: bufbuild/buf-setup-action@v0.3.1
29+
- uses: bufbuild/buf-setup-action@v1.8.0
3230
with:
33-
version: '0.54.1'
31+
github_token: ${{ github.token }}
3432

3533
# 3: Run break detector.
36-
- uses: bufbuild/buf-breaking-action@v0.3.0
34+
- uses: elide-tools/buf-breaking-action@46946d7bae1edc0758ffecb6087176e7590c6488
3735
env:
3836
BUF_INPUT_HTTPS_USERNAME: ${{ github.actor }}
3937
BUF_INPUT_HTTPS_PASSWORD: ${{ github.token }}
4038
with:
41-
against: 'https://github.com/CookiesCo/OpenCannabis.git#branch=dev'
39+
against: 'https://github.com/OpenCannabis/Specification.git#branch=dev'
40+
buf_token: ${{ secrets.BUF_TOKEN }}
41+
buf_input_https_username: ${{ github.actor }}
42+
buf_input_https_password: ${{ github.token }}
43+
44+
proto-push:
45+
runs-on: ubuntu-latest
46+
name: "Buf: Push"
47+
needs: [proto-lint, proto-breaking]
48+
steps:
49+
# 1: Pull code.
50+
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # renovate: tag=v2
51+
52+
# 2: Setup Buf.
53+
- uses: bufbuild/buf-setup-action@v1.8.0
54+
with:
4255
github_token: ${{ github.token }}
4356

57+
# 3: Push to BSR.
58+
- name: 'Model: Push to BSR'
59+
uses: bufbuild/buf-push-action@v1
60+
with:
61+
buf_token: ${{ secrets.BUF_TOKEN }}
62+

OpenCannabis.buf.bin

263 Bytes
Binary file not shown.

OpenCannabis.buf.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

OpenCannabis.buf.son

417 KB
Binary file not shown.

WORKSPACE

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,22 @@ http_archive(
4545
urls = ["https://github.com/grpc/grpc/archive/v%s.zip" % GRPC_VERSION],
4646
)
4747

48+
http_archive(
49+
name = "com_github_grpc_grpc_web",
50+
strip_prefix = "grpc-web-b0ea9c7c45d6f9ea5338fc61a81b47f589a91259",
51+
sha256 = "a7ae33e32b95049f11373b62019b742464576a17c602fa6b2457926749d58a1c",
52+
urls = ["https://github.com/grpc/grpc-web/archive/b0ea9c7c45d6f9ea5338fc61a81b47f589a91259.tar.gz"],
53+
)
54+
55+
http_archive(
56+
name = "io_bazel_rules_go",
57+
sha256 = "099a9fb96a376ccbbb7d291ed4ecbdfd42f6bc822ab77ae6f1b5cb9e914e94fa",
58+
urls = [
59+
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.35.0/rules_go-v0.35.0.zip",
60+
"https://github.com/bazelbuild/rules_go/releases/download/v0.35.0/rules_go-v0.35.0.zip",
61+
],
62+
)
63+
4864
http_archive(
4965
name = "io_grpc_proto",
5066
sha256 = "f081eba5884bf09051d27664aede4fc22bbaa77da477735d745bcef17bd088f1",
@@ -94,7 +110,6 @@ buildbuddy_deps()
94110
load("@io_buildbuddy_buildbuddy_toolchain//:rules.bzl", "buildbuddy")
95111
buildbuddy(name = "buildbuddy_toolchain")
96112

97-
98113
load("@gust//defs:build.bzl", "install_dependencies")
99114
load("@//config:build.bzl", app_dependencies = "install_dependencies")
100115
load("@gust//defs:config.bzl", "CHROMIUM", "FIREFOX", "SAUCE", "GRAALVM_VERSION", "GRAALVM_JDK_VERSION", "K8S_VERSION")
@@ -117,7 +132,7 @@ switched_rules_by_language(
117132
java = True,
118133
nodejs = False,
119134
php = False,
120-
python = True,
135+
python = False,
121136
ruby = False,
122137
)
123138

@@ -149,6 +164,15 @@ rules_proto_dependencies()
149164

150165
rules_proto_toolchains()
151166

167+
#
168+
# Go
169+
#
170+
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
171+
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
172+
173+
go_rules_dependencies()
174+
go_register_toolchains(version = "1.19.1")
175+
gazelle_dependencies()
152176

153177
#
154178
# Extensions
@@ -168,8 +192,8 @@ http_archive(
168192
## NodeJS
169193
http_archive(
170194
name = "build_bazel_rules_nodejs",
171-
sha256 = "8a7c981217239085f78acc9898a1f7ba99af887c1996ceb3b4504655383a2c3c",
172-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0/rules_nodejs-4.0.0.tar.gz"],
195+
sha256 = "c911b5bd8aee8b0498cc387cacdb5f917098ce477fb4182db07b0ef8a9e045c0",
196+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.7.1/rules_nodejs-4.7.1.tar.gz"],
173197
)
174198

175199
load(
@@ -386,14 +410,6 @@ stardoc_repositories()
386410
load("@build_stack_rules_proto//swift:deps.bzl", "swift_proto_library")
387411
swift_proto_library()
388412

389-
## Go
390-
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
391-
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
392-
393-
go_rules_dependencies()
394-
go_register_toolchains()
395-
gazelle_dependencies()
396-
397413
## Protoc-Gen-Doc
398414
load("@protoc_gen_doc//defs:deps.bzl", protoc_gen_doc_dependencies="go_dependencies")
399415
protoc_gen_doc_dependencies()
@@ -426,15 +442,16 @@ npm_bazel_labs_dependencies()
426442
## JarJar
427443
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
428444

429-
git_repository(
445+
http_archive(
430446
name = "com_github_johnynek_bazel_jar_jar",
431-
shallow_since = "1594234634 -1000",
432-
commit = "171f268569384c57c19474b04aebe574d85fde0d",
433-
remote = "git://github.com/johnynek/bazel_jar_jar.git",
447+
sha256 = "97c5f862482a05f385bd8f9d28a9bbf684b0cf3fae93112ee96f3fb04d34b193",
448+
strip_prefix = "bazel_jar_jar-171f268569384c57c19474b04aebe574d85fde0d",
449+
urls = ["https://github.com/OpenCannabis/bazel_jar_jar/archive/171f268569384c57c19474b04aebe574d85fde0d.tar.gz"],
434450
)
435451

436452
load(
437453
"@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl",
438454
"jar_jar_repositories",
439455
)
440456
jar_jar_repositories()
457+

buf.lock

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
# Generated by buf. DO NOT EDIT.
22
version: v1
33
deps:
4-
- remote: buf.build
5-
owner: elide
6-
repository: elide
7-
commit: 1092168af4d84098a31f87a11689f7b2
84
- remote: buf.build
95
owner: elide
106
repository: safe-html-types
11-
commit: 067cdbab3a254649892ff1e9f778e70b
7+
commit: 3d5d7e9b28be4293bba1e2571091590e
128
- remote: buf.build
139
owner: googleapis
1410
repository: googleapis
15-
commit: cf209eca30404c41a80fec3caba9903f
11+
commit: d1263fe26f8e430a967dc22a4d0cad18

buf.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
version: v1
22
name: buf.build/ocpx/protocol
33
deps:
4-
- buf.build/elide/elide:v2
54
- buf.build/elide/safe-html-types:main
65
- buf.build/googleapis/googleapis
76
build:

config/versions.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
PROTOBUF_VERSION = "3.15.3"
33
GRPC_VERSION = "1.38.1"
4-
NODE_VERSION = "14.15.0"
5-
YARN_VERSION = "1.22.4"
4+
NODE_VERSION = "17.4.0"
5+
YARN_VERSION = "1.22.17"
6+

opencannabis/BUILD.bazel

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -80,28 +80,29 @@ pkg_tar(
8080
srcs = ["//opencannabis/%s:%s-doc" % (n, n) for n in MODULES if n not in DOC_SKIP],
8181
)
8282

83-
buf_image(
84-
name = "image_bin",
85-
out = "OpenCannabis.buf.bin",
86-
config = "//:buf.yaml",
87-
protos = [
88-
":OpenCannabis",
89-
],
90-
)
91-
92-
buf_image(
93-
name = "image_json",
94-
out = "OpenCannabis.buf.json",
95-
config = "//:buf.yaml",
96-
protos = [
97-
":OpenCannabis",
98-
],
99-
extra_args = [
100-
"--log-level=debug",
101-
],
102-
)
83+
#buf_image(
84+
# name = "image_bin",
85+
# out = "OpenCannabis.buf.bin",
86+
# config = "//:buf.yaml",
87+
# protos = [
88+
# ":OpenCannabis",
89+
# ],
90+
#)
91+
92+
#buf_image(
93+
# name = "image_json",
94+
# out = "OpenCannabis.buf.json",
95+
# config = "//:buf.yaml",
96+
# protos = [
97+
# ":OpenCannabis",
98+
# ],
99+
# extra_args = [
100+
# "--log-level=debug",
101+
# ],
102+
#)
103+
104+
#alias(
105+
# name = "image",
106+
# actual = ":image_bin",
107+
#)
103108

104-
alias(
105-
name = "image",
106-
actual = ":image_bin",
107-
)

0 commit comments

Comments
 (0)