Skip to content
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

Support ProgramOptions to disable string conversion and list/string concatenation #1078

Open
2 of 3 tasks
sergiitk opened this issue Nov 25, 2024 · 0 comments
Open
2 of 3 tasks

Comments

@sergiitk
Copy link
Member

Feature request checklist

  • There are no issues that match the desired change
  • 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
To make CEL environment setup consistent across CEL implementations, I propose to add equivalent runtime options that control string conversion and list/string concatenation equivalent to those found in CEL-cpp:

// Enable string() overloads.
bool enable_string_conversion = true;

// Enable string concatenation overload.
bool enable_string_concat = true;

// Enable list concatenation overload.
bool enable_list_concat = true;

Example

// Actual option names up to the implementer.
opts := cel.EvalOptions(cel.OptDisableDisableStringConcat |
	cel.OptDisableDisableListConcat | cel.OptDisableDisableListConcat)
prg, err := env.Program(ast, opts)

Related

@sergiitk sergiitk changed the title Support CelOptions to disable string conversion and list/string concatenation Support CelOptions to disable string conversion and list/string concatenation Nov 25, 2024
@sergiitk sergiitk changed the title Support CelOptions to disable string conversion and list/string concatenation Support program options to disable string conversion and list/string concatenation Nov 25, 2024
@sergiitk sergiitk changed the title Support program options to disable string conversion and list/string concatenation Support ProgramOptions to disable string conversion and list/string concatenation Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant