Git Product home page Git Product logo

Comments (3)

pcj avatar pcj commented on July 19, 2024

Sorry for the delay in responding to this, partly because I don't quite understand the problem. Can you show the protoc command in full that works for you?

You can specify additional options to the protoc-gen-go plugin as follows:

go_proto_library(
  name = "x",
  protos = ["x.proto"],
)
go_proto_library(
  name = "y",
  protos = ["y.proto"],
  proto_deps = [":x"],
  pb_options = ["import_prefix=foo/"],
)

...but I suspect the association between the import_prefix and the rule it is defined on may need to be transitively propagated to dependent rules.

Anyway, in the example I provided above, the import_prefix does not appear necessary, so I'm back to the original problem of not understanding the issue at hand.

from rules_protobuf.

junghoahnsc avatar junghoahnsc commented on July 19, 2024

pb_options = ["import_prefix=foo/"], was the what I was looking for.
But yes, it turned out import_prefix is not necessary. I had to specify all imported protos, but I missed one. (golang/protobuf#254)

Thanks!

from rules_protobuf.

pcj avatar pcj commented on July 19, 2024

Sounds good. If this is resolved go ahead and close the issue.

from rules_protobuf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.