Comments (3)
Hi David,
You are always welcome to reach out to [email protected], especially if there's some of the Go code involved.
The short answer to your question is that evaluation over protos which are not linked into the environment and added as cel.Types
(or cel.TypeDescs
) will result in an error. Generally the evaluation library is embedded in the binary where the evaluation occurs, but the parse / check can remain separate. For example, you could parse / check via gRPC, but evaluate the result with https://github.com/google/cel-cpp or https://github.com/google/cel-go.
However, you should be able build a JSON object in CEL with a top-level @type
set to proper type url and get the protobuf.Any
unpack
methods to properly deserialize the JSON to a protobuf known to your environment.
Hope that helps,
-Tristan
from cel-spec.
Thank you for your response and explanation. The problem is I'm in Java/Kotlin code here, so using the go library is not a possibility. I would have to make the protobuf definitions known to the CEL service, which somewhat defies the purpose of a general evaluation service. Still, thank you for the clarification.
Feel free to close the issue.
from cel-spec.
Here are a few things to consider:
- There is a chance we will open source a Java version of CEL.
- The JSON trick I mentioned will make the object compatible with
Any
deserialization, and might work for you. - The conformance service was really only meant for handling a uniform set of test cases, and Go in particular doesn't support dynamic proto construction like some of the other proto implementations do. However, if you know the set of proto message types, you can modify the service and register the types in Go.
from cel-spec.
Related Issues (20)
- Will cel be moving to a new organization? HOT 1
- [Question] how to specify now()? HOT 3
- Support jq x[] operation
- Support bitwise operators HOT 3
- C spex
- Link to the implementation dashboard is broken. HOT 1
- Function Definitions and Variables HOT 2
- Protobuf extensions HOT 2
- Checking for undeclared reference HOT 1
- hobo HOT 1
- Monaco Editor language support HOT 4
- What does the `~*` mean? HOT 1
- [question] Duplicate/unique check expression HOT 2
- Bzlmod for v0.14.0
- Add access to the descriptor (of a protobuf message). HOT 1
- .
- Pięknie chyba się udalo
- Będzie dobrze
- Internet, telefonia i telewizja | Plus
- Should `optional.none()` == `null` ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cel-spec.