-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] CEL-Java is not fully compatible with Protobuf V4 #462
Comments
I was able to reproduce this. My suspicion is that something about the protobuf upgrade to 4.28.0 is causing this issue, and that the binary compatibility may not have been fully restored as stated in protocolbuffers/protobuf#17247. Either that, or the dependent protos (ExprValue from The workaround is to downgrade CEL to 0.6.0 as of now. I'll look into this further. |
This is an issue on any code path in CEL that references the Builder's methods on protobuf messages. The earlier release of Protobuf v4 have removed GeneratedMessageV3, and shims were added afterwards to restore ABI compatibility in 4.27.x, but not fully. Particularly, any generated messages produced before protoc version 3.25.x are no longer compatible with Protobuf V4. Bazel's built-in proto toolchain ( In short, CEL is not compatible with protobuf v4. The published JAR for 0.7.1 forces protobuf v4 as a dependency so it should not be used. I'll try to release a fix soon. |
Thank you. Just note: |
Oh for that one, you just need to bring in proto-google-common-protos from maven. Not sure why that's not being resolved automatically in gradle, but that's a separate issue. Btw, the issue in 0.7.1 is not just specific to constant folding. You'll run into issues in other places where an unknown value needs to be referenced at all internally. |
Fixes #462 PiperOrigin-RevId: 684215593
Fixes #462 PiperOrigin-RevId: 684215593
Fixes #462 PiperOrigin-RevId: 684215593
@bugs84 The latest release 0.8.0 should work now. Thank you for reporting. |
Thank you. I confirm, that sample project with cel 0.8.0 and |
Describe the bug
ConstantFoldingOptimizer doesn't work for some expressions. e.g. "my_var in ['H', 'O']"
To Reproduce
Clone this repository, that reproduce the bug.
https://github.com/bugs84/CelOptimizerIssue
Current issue
Program ends with following exception:
The text was updated successfully, but these errors were encountered: