You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm tracking ziglang/zig#12325 hoping it will fix this. i'd rather wait for it than proceed with generating c code and using it cause the c route gets messy very fast. i don't to deal with 3 files per generated .proto nor want users to have to do so.
what is happening here? each generated .proto message type needs to have const descriptor and field_descriptors decls. this is because in deserialize()desc needs a reference to fieldshere. and later a desc.field needs a reference back to a MessageDescriptorhere.
i have considered and played with these workarounds:
using with -ofmt=c to generate compatible struct defs for types in protobuf-types.zig and here. but it seems -ofmt=c doesn't gen structs decls yet.
generating c code myself. this is possible now by manually setting gen.zig#output_format = .c. however this means that i have to make sure my zig structs are exactly synced up with c structs. this is a pain to do manually. maybe it could be automated? its easier to just wait for now and see if the issue above fixes it.
the idea would be to keep {Field,Message,Enum}Descriptor in a .proto file and generate zig and c code from it.
The text was updated successfully, but these errors were encountered:
trying to generate code for a simple recursive message type produces the following dependency loop error.
i'm tracking ziglang/zig#12325 hoping it will fix this. i'd rather wait for it than proceed with generating c code and using it cause the c route gets messy very fast. i don't to deal with 3 files per generated .proto nor want users to have to do so.
what is happening here? each generated .proto message type needs to have const
descriptor
andfield_descriptors
decls. this is because in deserialize()desc
needs a reference tofields
here. and later adesc.field
needs a reference back to aMessageDescriptor
here.i have considered and played with these workarounds:
gen.zig#output_format = .c
. however this means that i have to make sure my zig structs are exactly synced up with c structs. this is a pain to do manually. maybe it could be automated? its easier to just wait for now and see if the issue above fixes it.{Field,Message,Enum}Descriptor
in a .proto file and generate zig and c code from it.The text was updated successfully, but these errors were encountered: