FirebaseExtended / protobuf-rules-gen

This is an experimental protoc plugin that generates Firebase Rules for Cloud Firestore based on Google's Protocol Buffer format. This allows you to easily validate your data in a platform independent manner.
Apache License 2.0
197 stars 13 forks source link

Fix Bazel build #42

Closed kimurayu45z closed 2 years ago

kimurayu45z commented 2 years ago

https://github.com/FirebaseExtended/protobuf-rules-gen/issues/39

I could fix the broken configurations of Bazel.

The build of any directory exclude example succeeded.

The only remaining error is

% bazel build //...                                                                 
ERROR: /home/yu/src/github.com/FirebaseExtended/protobuf-rules-gen/example/BUILD:3:30: in proto_gen rule //example:schema_genproto_rules: 
Traceback (most recent call last):
        File "/home/yu/.cache/bazel/_bazel_yu/40604a59a4d009dade8a4279b557a9f0/external/com_google_protobuf/protobuf.bzl", line 146, column 28, in _proto_gen_impl
                ctx.actions.run(
Error in run: param 'outputs' may not be empty
ERROR: Analysis of target '//example:schema_genproto_rules' failed; build aborted: Analysis of target '//example:schema_genproto_rules' failed
INFO: Elapsed time: 0.067s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

@var-const Could you give me some ideas?

google-cla[bot] commented 2 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

kimurayu45z commented 2 years ago

@googlebot I signed it!

kimurayu45z commented 2 years ago

I could fix the above error in the commit just now

% bazel build //...
INFO: Analyzed 12 targets (6 packages loaded, 214 targets configured).
INFO: Found 12 targets...
INFO: Elapsed time: 61.811s, Critical Path: 20.47s
INFO: 407 processes: 22 internal, 385 linux-sandbox.
INFO: Build completed successfully, 407 total actions
 % bazel version
Build label: 4.2.0
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Aug 18 12:48:25 2021 (1629290905)
Build timestamp: 1629290905
Build timestamp as int: 1629290905
kimurayu45z commented 2 years ago

The changes in this PR is included in https://github.com/FirebaseExtended/protobuf-rules-gen/pull/43 so I close this PR.