Giter Site home page Giter Site logo

generated code uses wrong package about proteus HOT 4 CLOSED

src-d avatar src-d commented on July 17, 2024
generated code uses wrong package

from proteus.

Comments (4)

smola avatar smola commented on July 17, 2024

I was not using master. Updating proteus to master and have the following error instead:

➜  sdk git:(a1f8dde) ✗ proteus  -f $GOPATH/src/github.com/bblfsh/sdk/protos -p github.com/bblfsh/sdk/protocol -p github.com/bblfsh/sdk/uast --verbose
WARN: ignoring type interface{Next() /home/smola/dev/go/src/github.com/bblfsh/sdk/uast.Path}
WARN: ignoring type interface{Step(); /home/smola/dev/go/src/github.com/bblfsh/sdk/uast.PathIter}
INFO: Generated proto: /home/smola/dev/go/src/github.com/bblfsh/sdk/protos/github.com/bblfsh/sdk/protocol/generated.proto
INFO: Generated proto: /home/smola/dev/go/src/github.com/bblfsh/sdk/protos/github.com/bblfsh/sdk/uast/generated.proto
github.com/bblfsh/sdk/uast/generated.proto: File not found.
github.com/bblfsh/sdk/protos/github.com/bblfsh/sdk/protocol/generated.proto: Import "github.com/bblfsh/sdk/uast/generated.proto" was not found or had errors.
github.com/bblfsh/sdk/protos/github.com/bblfsh/sdk/protocol/generated.proto:24:9: "github.com.bblfsh.sdk.uast.Node" is not defined.
github.com/bblfsh/sdk/protos/github.com/bblfsh/sdk/protocol/generated.proto:40:9: "github.com.bblfsh.sdk.uast.Node" is not defined.
error generating Go files from "/home/smola/dev/go/src/github.com/bblfsh/sdk/protos/github.com/bblfsh/sdk/protocol/generated.proto": exit status 1

from proteus.

smola avatar smola commented on July 17, 2024

When calling protoc for the second package (protocol) it does not find the proto file for the first package (uast). My workaround is calling:
proteus -f $GOPATH/src -p github.com/bblfsh/sdk/uast -p github.com/bblfsh/sdk/protocol --verbose so that path for Go code and proto files are the same.

And then I'm back to the original error of this issue, which I'm patching manually.

from proteus.

erizocosmico avatar erizocosmico commented on July 17, 2024

PR sent to gogo/protobuf with the fix gogo/protobuf#336

from proteus.

abeaumont avatar abeaumont commented on July 17, 2024

It's working correctly now, I think it can be closed.
Thanks @erizocosmico for the fix!

from proteus.

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.