bufbuild / rules_buf

Bazel rules for Buf.
Apache License 2.0
47 stars 17 forks source link

Missing `buf_push` symbol #51

Closed debkanchan closed 11 months ago

debkanchan commented 11 months ago

When running gazelle with rules_buf v0.2.0 it generates the following BUILD file

load("@rules_buf//buf:defs.bzl", "buf_push")

buf_push(
    name = "buf_push",
    config = "buf.yaml",
    lock = "buf.lock",
    targets = ["@buf_deps_api//ride/driver/v1alpha1:v1alpha1_proto"],
)

However when running bazel build //... it throws the following error

ERROR: Traceback (most recent call last):
        File "/Users/debkanchan/Code/ride/backend/driver-service/api/BUILD.bazel", line 1, column 35, in <toplevel>
                load("@rules_buf//buf:defs.bzl", "buf_push")
Error: file '@rules_buf//buf:defs.bzl' does not contain symbol 'buf_push'
ERROR: package contains errors: api
ERROR: package contains errors: api: Traceback (most recent call last):
        File "/Users/debkanchan/Code/ride/backend/driver-service/api/BUILD.bazel", line 1, column 35, in <toplevel>
                load("@rules_buf//buf:defs.bzl", "buf_push")
Error: file '@rules_buf//buf:defs.bzl' does not contain symbol 'buf_push'
ERROR: Skipping '//...': Error evaluating '//...': error loading package 'api': Package 'api' contains errors
WARNING: Target pattern parsing failed.
ERROR: Error evaluating '//...': error loading package 'api': Package 'api' contains errors
INFO: Elapsed time: 12.372s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (14 packages loaded)
srikrsna-buf commented 11 months ago

I see, gazelle is still generating them. I'll update it to exclude buf_push. Thank you for reporting this!