Closed tbonza closed 2 years ago
Should work with v0.10.0
or v0.9.1
. But that needs re-generating the julia code from proto files using the updated ProtoBuf.jl.
(In hindsight, should probably have bumped minor version instead of patch version for #150)
After re-generating the julia code from proto files using v0.10.0
, I'm still getting the error. I wondered if the protoc
version may be out of date, I'm using
protoc --version
libprotoc 3.14.0
That's strange. Can you verify if the generated structs are something like this? Basically they should have three fields as in the linked example.
If not, then I suspect the old version of ProtoBuf is somehow getting invoked, possibly because of some old paths and environment variables.
The generated structs are missing __protobuf_jl_internal_defaultset
so instead I get
mutable struct Candidates <: ProtoType
__protobuf_jl_internal_meta::ProtoMeta
__protobuf_jl_internal_values::Dict{Symbol,Any}
I've been using Homebrew to install protobuf so the issue may be there. I've been using this package for the past year without any issues other than needing to occasionally re-generate Julia files from the proto.
I would suggest checking that correct version of these two should be available via PATH
environment:
ProtoBuf/plugin/protoc-gen-julia
- one from ProtoBuf v0.10.0 package folderjulia
executable - one which has ProtoBuf.jl v0.10.0 installed (this could be set in the JULIA
environment variable as well)In this case, I'm developing a package so I'm managing my environment via julia --project=.
from within the package directory. Using v0.10.0 and the package manager, my Project.toml
includes ProtoBuf = "3349acd9-ac6a-5e09-bcdb-63829b23a429"
.
What are some helpful next steps? I could do a pull request with a test that replicates the issue.
This issue is really old and ProtoBuf.jl 1.0 has been release recently... closing for now, but do reach out if you encounter problems with the new version. Cheers.
Using a .proto file like the following, I'm unable to generate Julia code using
v0.10.0
orv0.9.1
There's no issue withv0.9.0
.The error message I receive when running my test suite using
v0.10.0
is the following:My interpretation of this error message is that I'm having an issue with
readproto
due to a missing field in the Julia files I've generated from the above protobuf.