feat: Reject with keyword usage

RVM does not plan to support the `with` keyword which is mainly used
for testing.

- introduce CompilerError::WithKeywordUnsupported and fail query compilation
  when any literal carries with_mods
- skip OPA test cases that hit the error

The "withkeyword" folder is retained in the TODO list to indicate its
lack of support.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2025-12-03 15:22:12 -06:00
parent a514e8da83
commit d0fa639bb8
4 changed files with 24 additions and 3 deletions
+3
View File
@@ -15,6 +15,9 @@ pub enum CompilerError {
#[error("Unknown builtin function: {name}")]
UnknownBuiltinFunction { name: String },
#[error("the `with` keyword is not supported by the compiler yet")]
WithKeywordUnsupported,
#[error("internal: missing context for yield")]
MissingYieldContext,