Comments (10)
I've isolated the issue on a branch on my repo for you to reproduce it:
https://github.com/haikalpribadi/grakn/tree/bazel-init-pubref-rules-proto
You can find the BUILD
file here: https://github.com/haikalpribadi/grakn/blob/bazel-init-pubref-rules-proto/protocol/proto/BUILD
Once you clone the repo, run bazel build //protocol:client-node-proto
to reproduce the problem.
from rules_proto.
Ah yes the proto_source_root. I'll try to look at this shortly.
from rules_proto.
Thanks, @pcj !
from rules_proto.
Actually after looking into this issue I don't think it is related to proto_source_root
. What you are looking for is a new feature that has a PR open that will allow one to modify the import prefix of proto in question.
from rules_proto.
There's also this issue that I opened in grpc-java
at about the same time cause i wasn't sure where the cause is. Do you think this is more relevant? grpc/grpc-java#4896
from rules_proto.
Ultimately I think the problem reduces to adding additional --proto_path=B.proto=some-package/B.proto
arguments to protoc
.
It's fairly trivial to add that feature to all the proto_compile
rules, but since we are dependent on the native proto_library
rule, unless that implementation has the ability to communicate those arguments to protoc
itself (since it calls protoc
to generate the descriptor_set), it won't work.
Another option is to rewrite the proto_library
in skylark using aspects AND conform to the same provider structure that the native rule returns. I'm a little tempted to try this.
from rules_proto.
Or, redo your protos to have a common import structure, like the googleapis repo. But for many organizations with existing build workflow constraints and dependent code, it's not practical to do this.
from rules_proto.
Well, proto_library
can already handle this, by taking in proto_source_root
argument. Can this be extended/used in the {lang}_grpc_compile
rules?
from rules_proto.
Are you able to build the proto_library
target in this case (separate from any {lang}_grpc_compile
rule)?
Does bazel build //protocol:client-proto
figure out the imports and compile the descriptor set correctly?
from rules_proto.
Yes, proto_library
compiles correctly with proto_source_root
, since Bazel 0.17.2. So "yes" to both the above questions, @pcj :)
from rules_proto.
Related Issues (9)
- com_github_uber_prototool not included in WORKSPACE HOT 2
- De-Fork https://github.com/stackb/rules_proto
- LICENSE File HOT 2
- node_grpc_compile fails without further error message HOT 8
- Missing dependencies in installation instructions HOT 4
- How to set output_to_workspace in rules_proto HOT 2
- Bazel can't find rules_proto//java package when running java_grpc_library
- Sandbox-copied protos are not used in compilation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_proto.