Closed smola closed 6 years ago
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
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.
PR sent to gogo/protobuf with the fix https://github.com/gogo/protobuf/pull/336
It's working correctly now, I think it can be closed. Thanks @erizocosmico for the fix!
The following patch applied manually to the generated code makes it build again: