https://github.com/abitofhelp/bazel-go-googleapis
This is an example using the googleapis proto package from Bazel Central Registry rather than using an archive_override in the MODULE.bazel file.
https://github.com/abitofhelp/bazel-go-googleapis
bazel bzlmod gazelle go golang grpc grpc-go grpc-golang grpc-reflection protobuf protocol-buffers
Last synced: 2 months ago
JSON representation
This is an example using the googleapis proto package from Bazel Central Registry rather than using an archive_override in the MODULE.bazel file.
- Host: GitHub
- URL: https://github.com/abitofhelp/bazel-go-googleapis
- Owner: abitofhelp
- License: mit
- Created: 2024-06-04T07:15:51.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-11T08:50:31.000Z (12 months ago)
- Last Synced: 2024-06-11T10:17:32.985Z (12 months ago)
- Topics: bazel, bzlmod, gazelle, go, golang, grpc, grpc-go, grpc-golang, grpc-reflection, protobuf, protocol-buffers
- Language: Starlark
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#bazel-go-googleapis.git
This repository contains a client/server solution implementing the classic Greet service using the following technologies:
N.B. It does not use any of Buf's technology.
* Bazel
* Gazelle
* Go
* GoogleApis (Bazel Central Registry)
* Grpc
* Grpc Reflection
* Protocol BuffersMy goal was to explore how to use the googleapis proto package from BCR rather than having to
configure the following in the MODULE.bazel file.```
# See:
# https://bazel.build/external/migration#fetch-deps-module-extensions
# https://github.com/bazelbuild/rules_go/issues/3685GOOGLE_APIS_VERSION = "64926d52febbf298cb82a8f472ade4a3969ba922"
bazel_dep(
name = "com_google_googleapis",
version = GOOGLE_APIS_VERSION,
repo_name = "googleapis",
)
archive_override(
module_name = "com_google_googleapis",
integrity = "sha256-nRqTDnZ8k8glOYuPhpLso/41O5qq3t+88fyiKCyF34g=",
patch_strip = 1,
patches = [
"scripts/bazel/add_bzlmod_support.patch", # https://github.com/googleapis/googleapis/pull/855
],
strip_prefix = "googleapis-" + GOOGLE_APIS_VERSION,
urls = [
"https://github.com/googleapis/googleapis/archive/%s.zip" % GOOGLE_APIS_VERSION,
],
)
```