Open rodaine opened 11 months ago
@rodaine I believe all of the core libraries support protobuf extension accesses; however, we haven't documented this in the spec.
https://github.com/google/cel-go/blob/master/ext/protos.go https://github.com/google/cel-java/blob/main/extensions/src/main/java/dev/cel/extensions/CelProtoExtensions.java https://github.com/google/cel-cpp/blob/master/extensions/proto_ext.h
Hopefully this helps you get started!
Thanks! @Alfus pointed me toward the cel-go extension functions shortly after I asked (of course 😅). Do you think it's worth documenting that this is to be handled by functions?
While rare nowadays in general, protobuf extensions are still used to define custom options on descriptors and seem to be one of the first features (re)enabled with editions. The CEL spec doesn't appear to mention one way or another if these fields should be accessible from an expression.
I can see two paths towards supporting proto extensions:
Thoughts?