Code Monkey home page Code Monkey logo

Comments (11)

nikkolasg avatar nikkolasg commented on June 7, 2024 1

Still not working. I have a similar setup and I have the same error. Plus you're missing the proto files in your command (which when you add it on the command, generates an error).
Would it be possible to make your exemple a little bit more complete ? That'd be really helpful. Thanks,

from goprotowrap.

joyang1 avatar joyang1 commented on June 7, 2024 1
|--a
     |--a.proto
|--b
     |--b.proto

in b.proto,I will import a/a.proto;
I use protowrap --go_out=tmp/ -I. /.proto to generate go code.
Then I fetch an Error: proto file "" must have a lexicographical prefix of one of the import directories.

from goprotowrap.

yathindra avatar yathindra commented on June 7, 2024

I'm hitting the same issue. Could anybody please give an example.

from goprotowrap.

jeffrand avatar jeffrand commented on June 7, 2024

Here's how I use it. We have our .proto files in a directory like this:

protos/
protos/base.proto
protos/foo/foo.proto
protos/bar/bar.proto

Then we run:
protowrap --go_out=tmp/ -I.

from goprotowrap.

jeffrand avatar jeffrand commented on June 7, 2024

@nikkolasg can you share your .proto files and the command you're running? I ended up figuring out how to get this to work through trial and error, maybe I can help.

from goprotowrap.

kunwang0916 avatar kunwang0916 commented on June 7, 2024

@jeffrand
My folder structure:

.
├── a.proto
├── b.proto
├── c.proto
└── ddd
    └── d.proto

I tried run the command like your example: protowrap --go_out=tmp/ -I.

but always get same error:
Error: at least one input .proto file is required

Any suggestions?

from goprotowrap.

jeffrand avatar jeffrand commented on June 7, 2024

Sorry for the late response. Try:

protowrap --go_out=tmp/ -I. */*.proto

from goprotowrap.

kunwang0916 avatar kunwang0916 commented on June 7, 2024

@jeffrand Thanks, I found the reason is that Go is much stricter than other languages, the folder structure should match the package naming structure, otherwise, the compile would fail.

from goprotowrap.

joyang1 avatar joyang1 commented on June 7, 2024

@jeffrand are you fixed Error: proto file "" must have a lexicographical prefix of one of the import directories?

from goprotowrap.

jeffrand avatar jeffrand commented on June 7, 2024

from goprotowrap.

joyang1 avatar joyang1 commented on June 7, 2024

I have the same error with you;
#6 (comment)

from goprotowrap.

Related Issues (3)

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.