Summary
The current implementation uses deprecated CEL API types:
ref.TypeProvider (deprecated in favor of types.Provider)
ref.FieldType (deprecated in favor of types.FieldType)
Changes Needed
Provider Interface
Tests
Backward Compatibility
- Consider adding a compatibility layer if external users depend on the old interface
- Document migration path for users upgrading to the new API
Benefits
- Future-proof against CEL API changes
- Remove deprecation warnings from linter
- Align with modern CEL best practices
- Cleaner type system integration
Implementation Status
This modernization ensures cel2sql remains compatible with current and future CEL versions while providing a cleaner, more maintainable API.
Summary
The current implementation uses deprecated CEL API types:
ref.TypeProvider(deprecated in favor oftypes.Provider)ref.FieldType(deprecated in favor oftypes.FieldType)Changes Needed
Provider Interface
TypeProviderinterface to embedtypes.Providerinstead ofref.TypeProvidertypes.Providermethods:FindStructType(string) (*types.Type, bool)FindStructFieldNames(string) ([]string, bool)FindStructFieldType(string, string) (*types.FieldType, bool)NewValue(string, map[string]ref.Val) ref.ValTests
pg/provider_test.goto use modern APIFindType()calls withFindStructType()FindFieldType()calls withFindStructFieldType()*exprpb.Typeto*types.Type*ref.FieldTypeto*types.FieldTypepg/provider_testcontainer_test.goto use modern APIBackward Compatibility
Benefits
Implementation Status
types.ProviderThis modernization ensures cel2sql remains compatible with current and future CEL versions while providing a cleaner, more maintainable API.