cel-go icon indicating copy to clipboard operation
cel-go copied to clipboard

Replace `exprpb.Type` references with `cel.Type`

Open TristonianJones opened this issue 3 years ago • 0 comments

Feature request checklist

  • [X] There are no issues that match the desired change
  • [X] The change is large enough it can't be addressed with a simple Pull Request
  • [ ] If this is a bug, please file a Bug Report.

Change The top-level API currently emphasizes using cel.Type values rather than exprpb.Type values in an effort to reduce the protobuf surface area visible on the cel-go APIs. However, the ref.TypeProvider currently exposes a method to FindType and FindFieldType which return an exprpb.Type. This interface is used by a handful of customers to extend the CEL type-system, and creates a disconnect between the top-level API and the extensions.

The change should introduce a new TypeProvider which can wrap the old style and produce cel.Type values from these methods for use within the type-checker and runtimes.

Alternatives considered Provide new methods on the existing TypeProvider interface.

  • Functional, but would be a breaking API change for existing users.
  • Introduces a more complex migration burden of having to support both the old and new-style methods.

TristonianJones avatar Jul 14 '22 19:07 TristonianJones