clarkmcc/cel-rust

Context.clone() method used by macros is private to the crate

St4NNi opened this issue · 2 comments

St4NNi commented

The official cel-spec has some additional macros / functions that might be useful for some of our use cases like: exists or exists_one.

Unfortunately I am not able to implement them by myself because: Context.clone() is pub(crate) and not pub:

pub(crate) fn clone(&self) -> Context {

Am I missing something or wouldn't it be useful to provide the clone functionality and context shadowing also for custom extension functions?

Hi! Yes, it definitely makes sense to expose that. I'll get a fix released. Thanks!

Also, feel free to create PRs for anything missing from the spec. I know it's not fully up to spec today, but that's definitely the goal.

Fixed. Using the master branch you should be able to clone the context now. I created a new issue #32 for the missing macros.