-
Notifications
You must be signed in to change notification settings - Fork 19
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
Support gazelle in bzlmod #46
Conversation
Oh yeah! I want this =) |
Any chance we can get a new patch release out? ;) |
@Geethree Yes, I'd like get some cleanup work before I tag a release (mainly update deps). Should be soon |
@srikrsna-buf any updates on release? This has been a blocker for weeks for us |
After #48 is merged, I have to update the docs and then we can cut a release. In the meantime you can use the git_override |
@srikrsna-buf I'm trying to follow the example but I'm getting the following error ERROR: Analysis of target '//internal/api-handlers:api-handlers_test' failed; build aborted: module extension "buf" from "@rules_buf~override//buf:extensions.bzl" does not generate repository "buf_deps", yet it is imported as "buf_deps" in the usage at /Users/debkanchan/Code/ride/backend/driver-service/MODULE.bazel:15:20 MODULE.bazel bazel_dep(name = "rules_go", version = "0.42.0")
bazel_dep(name = "gazelle", version = "0.34.0")
bazel_dep(name = "rules_pkg", version = "0.9.1")
bazel_dep(name = "rules_buf", version = "0.1.1")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
bazel_dep(name = "rules_oci", version = "1.4.0")
bazel_dep(name = "container_structure_test", version = "1.16.0")
git_override(
module_name = "rules_buf",
commit = "ade38fc",
remote = "https://github.com/bufbuild/rules_buf.git",
)
buf = use_extension("@rules_buf//buf:extensions.bzl", "buf")
# Override the default version of buf
buf.toolchains(version = "v1.27.0")
# Allow references to labels under @buf_deps
use_repo(buf, "buf_deps")
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(go_deps, "build_buf_gen_go_bufbuild_protovalidate_protocolbuffers_go", "build_buf_gen_go_ride_wallet_connectrpc_go", "build_buf_gen_go_ride_wallet_protocolbuffers_go", "com_connectrpc_connect", "com_github_bufbuild_protovalidate_go", "com_github_golang_jwt_jwt_v5", "com_github_google_wire", "com_github_ilyakaznacheev_cleanenv", "com_github_micahparks_keyfunc_v2", "com_github_mmcloughlin_geohash", "com_github_onsi_ginkgo_v2", "com_github_onsi_gomega", "com_google_cloud_go_firestore", "com_google_firebase_go_v4", "org_golang_google_genproto", "org_golang_google_genproto_googleapis_api", "org_golang_google_grpc", "org_golang_google_protobuf", "org_golang_x_net", "org_uber_go_mock", "org_uber_go_zap")
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
oci.pull(
name = "distroless",
digest = "sha256:e7e79fb2947f38ce0fab6061733f7e1959c12b843079042fe13f56ca7b9d178c",
image = "gcr.io/distroless/static",
platforms = [
"linux/amd64",
"linux/arm64/v8",
],
)
use_repo(oci, "distroless") |
@DebkanchanSamadder If you don't need to use |
There's an existing issue with cel naming convention which is causing build with bzlmod to fail when using protovalidate. Any bzlmod specific workaround @srikrsna-buf ? |
@DebkanchanSamadder Maybe a better place to open the issue is the protovalidate repo? Also could you give a reproducible example? Maybe the module file? |
Support gazelle in bzlmod. #42 added support for bzlmod but it did not support the gazelle plugin, this updates the module file to support gazelle.