zig-protobuf icon indicating copy to clipboard operation
zig-protobuf copied to clipboard

Self referential types: identify cycles before encoding

Open Arwalk opened this issue 9 months ago • 0 comments

with the merge of #73 was identified that it could be nice to ensure that there are no cycles in the data to encode before trying to encode it.

Ideally, this check should only be performed when there can be cycles, ensuring that we do not do comparisons for nothing on each encoding.

I've tried to do it on the branch "self-ref-check-cycle", but failed to make it work: my code seems to fail to compile and throws a segmentation fault on the opentelemetry structures.

If anyone is willing to take a look at this branch and see if they can find a solution, i'd love it. I'm not currently sure how it could work properly on all our structures but fail here.

Arwalk avatar Mar 24 '25 15:03 Arwalk