ProtoBuf.jl
ProtoBuf.jl copied to clipboard
Code generation error
Getting issue with code generation for https://github.com/milvus-io/milvus-proto
using ProtoBuf
ProtoBuf.protoc(`-I=proto --julia_out=jlout proto/milvus.proto`)
ERROR: unresolved name milvus.proto.common.Status at scope
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] qualify_in_hierarchy(name::String, scope::ProtoBuf.Gen.Scope)
@ ProtoBuf.Gen ~/.julia/dev/ProtoBuf/src/gen.jl:158
[3] qualify_in_hierarchy(name::String, scope::ProtoBuf.Gen.Scope) (repeats 3 times)
@ ProtoBuf.Gen ~/.julia/dev/ProtoBuf/src/gen.jl:156
[4] scoped_svc_type_name(scope::ProtoBuf.Gen.Scope, typ_name::String)
@ ProtoBuf.Gen ~/.julia/dev/ProtoBuf/src/gen.jl:613
[5] generate_svc(io::IOBuffer, errio::IOBuffer, stype::ProtoBuf.GoogleProtoBuf.ServiceDescriptorProto, scope::ProtoBuf.Gen.Scope, svcidx::Int64, exports::Vector{String})
@ ProtoBuf.Gen ~/.julia/dev/ProtoBuf/src/gen.jl:630
[6] generate_file(io::IOBuffer, errio::IOBuffer, protofile::ProtoBuf.GoogleProtoBuf.FileDescriptorProto)
@ ProtoBuf.Gen ~/.julia/dev/ProtoBuf/src/gen.jl:775
[7] codegen(srcio::Base.PipeEndpoint)
@ ProtoBuf.Gen ~/.julia/dev/ProtoBuf/src/gen.jl:863
[8] (::ProtoBuf.Gen.var"#21#22")()
@ ProtoBuf.Gen ~/.julia/dev/ProtoBuf/src/gen.jl:916
[9] with_debug
@ ~/.julia/dev/ProtoBuf/src/gen.jl:899 [inlined]
[10] gen()
@ ProtoBuf.Gen ~/.julia/dev/ProtoBuf/src/gen.jl:914
[11] top-level scope
@ none:1
--julia_out: protoc-gen-julia: Plugin failed with status code 1.
The Status is actually present inside internally included file common.proto
Code generation for common.proto and schema.proto works without issues.
I had the same problem, hope to repair this. @tanmaykm
Similar, https://github.com/JuliaIO/ProtoBuf.jl/issues/137, the good news is that ProtoBuf.jl 1.0 should be able to resolve the issue you are having, but there is currently no support for Services and RPCs. This will be tracked in a separate issue. Closing for now.