Skip to content

oracle: Fix find-definition on expressions inside ast.Not nodes#8731

Merged
anderseknert merged 1 commit into
open-policy-agent:mainfrom
johanfylling:not/oracle_fix
Jun 3, 2026
Merged

oracle: Fix find-definition on expressions inside ast.Not nodes#8731
anderseknert merged 1 commit into
open-policy-agent:mainfrom
johanfylling:not/oracle_fix

Conversation

@johanfylling

Copy link
Copy Markdown
Contributor

ast.Node.Location wasn't properly copied during ResolveRefs compiler stage

`ast.Node.Location` wasn't properly copied during `ResolveRefs`compiler stage

Signed-off-by: Johan Fylling <johan.dev@fylling.se>

@anderseknert anderseknert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@anderseknert anderseknert merged commit 2a41f71 into open-policy-agent:main Jun 3, 2026
40 checks passed
@johanfylling johanfylling deleted the not/oracle_fix branch June 3, 2026 15:14
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Benchmark Comparison ( vs )

benchmark \ host                                                                                        local:tags=opa_wasm
                                                                                                                    vs base
CapabilitiesCurrentVersion                                                                                                ~
RewriteDynamics/1                                                                                                         ~
RewriteDynamics/10                                                                                                        ~
RewriteDynamics/100                                                                                                       ~
RewriteDynamics/1000                                                                                                      ~
RewriteDynamics/10000                                                                                                     ~
RewriteDynamics/100000                                                                                                    ~
GenerateLocalVar                                                                                                          ~
ParseModuleRulesBase/1                                                                                                    ~
ParseModuleRulesBase/10                                                                                                   ~
ParseModuleRulesBase/100                                                                                                  ~
ParseModuleRulesBase/1000                                                                                                 ~
ParseStatementBasicCall                                                                                                   ~
ParseStatementMixedJSON                                                                                                   ~
ParseStatementSimpleArray/1                                                                                          +2.01%
ParseStatementSimpleArray/10                                                                                         +2.38%
ParseStatementSimpleArray/100                                                                                             ~
ParseStatementSimpleArray/1000                                                                                            ~
ParseStatementNestedObjects/1x1                                                                                           ~
ParseStatementNestedObjects/5x1                                                                                           ~
ParseStatementNestedObjects/10x1                                                                                     +2.05%
ParseStatementNestedObjects/1x5                                                                                           ~
ParseStatementNestedObjects/1x10                                                                                          ~
ParseStatementNestedObjects/5x5                                                                                           ~
ParseSome                                                                                                                 ~
ParseEvery                                                                                                                ~
ParseDeepNesting/NestedArrays/depth-10                                                                                    ~
ParseDeepNesting/NestedArrays/depth-50                                                                                    ~
ParseDeepNesting/NestedArrays/depth-100                                                                                   ~
ParseDeepNesting/NestedArrays/depth-500                                                                                   ~
ParseDeepNesting/NestedArrays/depth-2500                                                                                  ~
ParseDeepNesting/NestedArrays/depth-12500                                                                                 ~
ParseDeepNesting/NestedObjects/depth-10                                                                                   ~
ParseDeepNesting/NestedObjects/depth-50                                                                                   ~
ParseDeepNesting/NestedObjects/depth-100                                                                                  ~
ParseDeepNesting/NestedObjects/depth-500                                                                                  ~
ParseDeepNesting/NestedObjects/depth-2500                                                                                 ~
ParseDeepNesting/NestedObjects/depth-12500                                                                                ~
ParseStatementNestedObjectsOrSets/1                                                                                       ~
ParseStatementNestedObjectsOrSets/5                                                                                       ~
ParseStatementNestedObjectsOrSets/10                                                                                      ~
ParseStatementNestedObjectsOrSets/15                                                                                      ~
ParseStatementNestedObjectsOrSets/20                                                                                      ~
ParseVars                                                                                                                 ~
ParseBasicABACModule                                                                                                      ~
ParseAnnotations                                                                                                          ~
ParseManyAnnotations                                                                                                      ~
CommentString                                                                                                             ~
ExprString/simple_expr                                                                                                    ~
ExprString/negated_expr_with_with_modifier                                                                                ~
ExprString/complex_expr                                                                                                   ~
ExprAppendText/simple_expr                                                                                                ~
ExprAppendText/negated_expr_with_with_modifier                                                                            ~
ExprAppendText/complex_expr                                                                                               ~
ExprMarshalJSON/simple_expr                                                                                               ~
ExprMarshalJSON/negated_expr_with_with_modifier                                                                           ~
ExprMarshalJSON/complex_expr                                                                                              ~
RuleMarshalJSON/simple_rule                                                                                               ~
RuleMarshalJSON/rule_with_multiple_exprs                                                                                  ~
RuleMarshalJSON/rule_with_some_decl                                                                                       ~
WithMarshalJSON                                                                                                           ~
TypeName                                                                                                                  ~
ValueName                                                                                                                 ~
ObjectLookup/5                                                                                                            ~
ObjectLookup/50                                                                                                           ~
ObjectLookup/500                                                                                                          ~
ObjectLookup/5000                                                                                                         ~
ObjectGet/lookup_in_empty_object                                                                                          ~
ObjectGet/existing_interned_key                                                                                           ~
ObjectGet/existing_string_key                                                                                             ~
ObjectGet/existing_int_number_key                                                                                         ~
ObjectGet/existing_float_number_key_as_int                                                                                ~
ObjectGet/existing_int_number_key_as_float                                                                                ~
ObjectGet/existing_float_key                                                                                              ~
ObjectGet/missing_string_key                                                                                              ~
ObjectGet/missing_int_number_key                                                                                          ~
ObjectGet/missing_float_key                                                                                               ~
ObjectFind/5_5                                                                                                            ~
ObjectFind/5_50                                                                                                      +4.36%
ObjectFind/5_500                                                                                                     +5.16%
ObjectFind/5_5000                                                                                                    +5.36%
ObjectFind/50_5                                                                                                           ~
ObjectFind/50_50                                                                                                          ~
ObjectFind/50_500                                                                                                         ~
ObjectFind/50_5000                                                                                                        ~
ObjectFind/500_5                                                                                                          ~
ObjectFind/500_50                                                                                                         ~
ObjectFind/500_500                                                                                                        ~
ObjectFind/500_5000                                                                                                       ~
ObjectFind/5000_5                                                                                                         ~
ObjectFind/5000_50                                                                                                        ~
ObjectFind/5000_500                                                                                                       ~
ObjectFind/5000_5000                                                                                                      ~
ObjectInsert/existing_key_and_value                                                                                       ~
ObjectInsert/existing_key,_new_value                                                                                      ~
ObjectInsert/new_key                                                                                                 -1.49%
ObjectInsert/new_key,_new_value                                                                                           ~
ObjectCreationAndLookup/5                                                                                                 ~
ObjectCreationAndLookup/50                                                                                                ~
ObjectCreationAndLookup/500                                                                                               ~
ObjectCreationAndLookup/5000                                                                                              ~
ObjectCreationAndLookup/50000                                                                                             ~
ObjectCreationAndLookup/500000                                                                                            ~
ObjectCreateWithInsertVsTermsArray/insert                                                                                 ~
ObjectCreateWithInsertVsTermsArray/terms_array                                                                       -2.01%
LazyObjectLookup/5                                                                                                        ~
LazyObjectLookup/50                                                                                                  -1.88%
LazyObjectLookup/500                                                                                                 -2.11%
LazyObjectLookup/5000                                                                                                     ~
LazyObjectFind/5_5                                                                                                        ~
LazyObjectFind/5_50                                                                                                       ~
LazyObjectFind/5_500                                                                                                      ~
LazyObjectFind/5_5000                                                                                                     ~
LazyObjectFind/50_5                                                                                                       ~
LazyObjectFind/50_50                                                                                                      ~
LazyObjectFind/50_500                                                                                                     ~
LazyObjectFind/50_5000                                                                                                    ~
LazyObjectFind/500_5                                                                                                      ~
LazyObjectFind/500_50                                                                                                     ~
LazyObjectFind/500_500                                                                                                    ~
LazyObjectFind/500_5000                                                                                                   ~
LazyObjectFind/5000_5                                                                                                     ~
LazyObjectFind/5000_50                                                                                                    ~
LazyObjectFind/5000_500                                                                                                   ~
LazyObjectFind/5000_5000                                                                                                  ~
SetCreationAndLookup/5                                                                                                    ~
SetCreationAndLookup/50                                                                                                   ~
SetCreationAndLookup/500                                                                                                  ~
SetCreationAndLookup/5000                                                                                                 ~
SetCreationAndLookup/50000                                                                                                ~
SetCreationAndLookup/500000                                                                                               ~
SetIntersection/5                                                                                                         ~
SetIntersection/50                                                                                                        ~
SetIntersection/500                                                                                                       ~
SetIntersection/5000                                                                                                      ~
SetIntersectionDifferentSize/4                                                                                            ~
SetIntersectionDifferentSize/50                                                                                           ~
SetIntersectionDifferentSize/500                                                                                          ~
SetIntersectionDifferentSize/5000                                                                                         ~
SetUnion/5                                                                                                                ~
SetUnion/50                                                                                                               ~
SetUnion/500                                                                                                              ~
SetUnion/5000                                                                                                             ~
SetUnionOverlapping/5                                                                                                     ~
SetUnionOverlapping/50                                                                                                    ~
SetUnionOverlapping/500                                                                                                   ~
SetUnionOverlapping/5000                                                                                                  ~
SetMembership/5                                                                                                           ~
SetMembership/50                                                                                                          ~
SetMembership/500                                                                                                         ~
SetMembership/5000                                                                                                        ~
SetCopy                                                                                                                   ~
ObjectCopy                                                                                                                ~
ArrayCopy/5                                                                                                               ~
ArrayCopy/50                                                                                                              ~
ArrayCopy/500                                                                                                             ~
RefCopy/5                                                                                                                 ~
RefCopy/10                                                                                                                ~
RefCopy/20                                                                                                                ~
RefCopyNonGround/fully_ground                                                                                             ~
RefCopyNonGround/mixed                                                                                                    ~
RefCopyNonGround/fully_ground/Copy                                                                                        ~
RefCopyNonGround/mixed/Copy                                                                                               ~
TermHashing/10                                                                                                            ~
TermHashing/100                                                                                                           ~
TermHashing/1000                                                                                                          ~
ObjectString/5/String()                                                                                                   ~
ObjectString/5/json.Marshal                                                                                               ~
ObjectString/50/String()                                                                                                  ~
ObjectString/50/json.Marshal                                                                                              ~
ObjectString/500/String()                                                                                                 ~
ObjectString/500/json.Marshal                                                                                             ~
ObjectString/5000/String()                                                                                                ~
ObjectString/5000/json.Marshal                                                                                            ~
ObjectStringInterfaces/5/String()                                                                                         ~
ObjectStringInterfaces/5/json.Marshal                                                                                     ~
ObjectStringInterfaces/50/String()                                                                                        ~
ObjectStringInterfaces/50/json.Marshal                                                                                    ~
ObjectStringInterfaces/500/String()                                                                                       ~
ObjectStringInterfaces/500/json.Marshal                                                                                   ~
ObjectStringInterfaces/5000/String()                                                                                      ~
ObjectStringInterfaces/5000/json.Marshal                                                                                  ~
ObjectStringInterfaces/50000/String()                                                                                     ~
ObjectStringInterfaces/50000/json.Marshal                                                                                 ~
ObjectConstruction/shuffled_keys/5                                                                                        ~
ObjectConstruction/shuffled_keys/50                                                                                       ~
ObjectConstruction/shuffled_keys/500                                                                                      ~
ObjectConstruction/shuffled_keys/5000                                                                                     ~
ObjectConstruction/shuffled_keys/50000                                                                                    ~
ObjectConstruction/shuffled_keys/500000                                                                                   ~
ObjectConstruction/increasing_keys/5                                                                                      ~
ObjectConstruction/increasing_keys/50                                                                                     ~
ObjectConstruction/increasing_keys/500                                                                                    ~
ObjectConstruction/increasing_keys/5000                                                                                   ~
ObjectConstruction/increasing_keys/50000                                                                                  ~
ObjectConstruction/increasing_keys/500000                                                                                 ~
ArrayString/5/String()                                                                                                    ~
ArrayString/5/json.Marshal                                                                                                ~
ArrayString/50/String()                                                                                              -2.28%
ArrayString/50/json.Marshal                                                                                          -1.69%
ArrayString/500/String()                                                                                                  ~
ArrayString/500/json.Marshal                                                                                              ~
ArrayString/5000/String()                                                                                                 ~
ArrayString/5000/json.Marshal                                                                                        -6.15%
ArrayEquality/5                                                                                                      -8.86%
ArrayEquality/50                                                                                                          ~
ArrayEquality/500                                                                                                    -9.03%
ArrayEquality/5000                                                                                                        ~
SetString/5/String()                                                                                                 -1.17%
SetString/50/String()                                                                                                -2.44%
SetString/500/String()                                                                                               -2.68%
SetString/5000/String()                                                                                              -4.90%
SetString/50000/String()                                                                                                  ~
SetMarshalJSON/5/json.Marshal                                                                                             ~
SetMarshalJSON/50/json.Marshal                                                                                            ~
SetMarshalJSON/500/json.Marshal                                                                                           ~
SetMarshalJSON/5000/json.Marshal                                                                                          ~
SetMarshalJSON/50000/json.Marshal                                                                                         ~
IsVarCompatibleString/#00                                                                                                 ~
IsVarCompatibleString/5heel                                                                                               ~
IsVarCompatibleString/__really_long_variable_name_1234567890                                                              ~
IsVarCompatibleString/_ello_                                                                                              ~
IsVarCompatibleString/h_llo                                                                                               ~
IsVarCompatibleString/hello                                                                                               ~
IsVarCompatibleString/incompatible_last_char!                                                                             ~
RefString/dot_builtin                                                                                                     ~
RefString/really_long                                                                                                     ~
RefString/scalars_ref                                                                                                     ~
RefString/simple_ref                                                                                                      ~
RefString/var_term                                                                                                        ~
RefString/with_escape                                                                                                     ~
InterfaceToValueInt/interned_int_value                                                                               -4.39%
InterfaceToValueInt/non-interned_int_value                                                                                ~
ValueToInterfaceInt                                                                                                       ~
ObjectMergeWith/without_conflict                                                                                          ~
ObjectMergeWith/with_conflict                                                                                             ~
ConstantPrefix                                                                                                            ~
StringPrefix                                                                                                              ~
GroundPrefix                                                                                                              ~
Ptr/with_escape                                                                                                           ~
Ptr/without_escape                                                                                                        ~
EscapeTemplateStringStringPart/_*_100                                                                                -7.68%
EscapeTemplateStringStringPart/{_*_100                                                                                    ~
EscapeTemplateStringStringPart/\{_*_100                                                                                   ~
EscapeTemplateStringStringPart/}{_*_100                                                                                   ~
EscapeTemplateStringStringPart/no_curly!!!_*_100                                                                          ~
EscapeTemplateStringStringPart/{unes{caped_*_100                                                                          ~
EscapeTemplateStringStringPart/{{{{{{{{{{_*_100                                                                           ~
CountUnescapedLeftCurly/_*_100                                                                                            ~
CountUnescapedLeftCurly/{_*_100                                                                                           ~
CountUnescapedLeftCurly/\{_*_100                                                                                          ~
CountUnescapedLeftCurly/}{_*_100                                                                                          ~
CountUnescapedLeftCurly/no_curly!!!_*_100                                                                                 ~
CountUnescapedLeftCurly/{unes{caped_*_100                                                                                 ~
CountUnescapedLeftCurly/{{{{{{{{{{_*_100                                                                                  ~
TemplateStringToString                                                                                               -3.04%
TemplateStringToStringEscapeCurlies                                                                                       ~
TemplateStringToStringEscapeControl                                                                                       ~
VarVisitorWalkAnyVsSpecific/Walk                                                                                          ~
VarVisitorWalkAnyVsSpecific/WalkBody                                                                                      ~
VarSetUpdateEmpty                                                                                                         ~
GenericVisitorWalkVsTypeVisitor/GenericVisitor                                                                            ~
GenericVisitorWalkVsTypeVisitor/TypeVisitor_term                                                                          ~
GenericVisitorWalkVsTypeVisitor/TypeVisitor_via_WalkRules                                                                 ~
InterningAccessValue/package_var_value                                                                                    ~
InterningAccessValue/interned_value                                                                                 -50.56%
InterningAccessValue/object_value                                                                                         ~
InterningAccessValue/new_value                                                                                            ~
FromBuiltinNames/single_part                                                                                              ~
FromBuiltinNames/two_parts                                                                                         +142.69%
FromBuiltinNames/three_parts                                                                                              ~
FromBuiltinNames/no_match                                                                                                 ~
FromBuiltinNames/no_match_long                                                                                            ~
NoNodeTypeAllocatesOnAppend/module                                                                                        ~
NoNodeTypeAllocatesOnAppend/module_annotated                                                                              ~
NoNodeTypeAllocatesOnAppend/package                                                                                       ~
NoNodeTypeAllocatesOnAppend/package_with_special_chars                                                                    ~
NoNodeTypeAllocatesOnAppend/import                                                                                        ~
NoNodeTypeAllocatesOnAppend/head                                                                                          ~
NoNodeTypeAllocatesOnAppend/head_assign                                                                                   ~
NoNodeTypeAllocatesOnAppend/head_with_key                                                                                 ~
NoNodeTypeAllocatesOnAppend/ref_head_with_value                                                                           ~
NoNodeTypeAllocatesOnAppend/body                                                                                          ~
NoNodeTypeAllocatesOnAppend/expr                                                                                          ~
NoNodeTypeAllocatesOnAppend/with                                                                                          ~
NoNodeTypeAllocatesOnAppend/every                                                                                         ~
NoNodeTypeAllocatesOnAppend/some_decl                                                                                     ~
NoNodeTypeAllocatesOnAppend/some_in_decl                                                                             +2.73%
NoNodeTypeAllocatesOnAppend/and,_implicit                                                                                 ~
NoNodeTypeAllocatesOnAppend/and,_implicit,_expanded                                                                       ~
NoNodeTypeAllocatesOnAppend/and,_explicit                                                                                 ~
NoNodeTypeAllocatesOnAppend/or,_implicit                                                                                  ~
NoNodeTypeAllocatesOnAppend/or,_implicit,_expanded                                                                        ~
NoNodeTypeAllocatesOnAppend/or,_explicit                                                                                  ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/var                                                                      ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/string                                                                   ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/string_with_escapes                                                      ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/string_with_newlines                                                     ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/number                                                                   ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/boolean                                                                  ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/null                                                                -3.58%
NoASTTypeAllocatesOnAppendToBufferOfStringLength/array                                                                    ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/set                                                                      ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/object                                                                   ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/call                                                                     ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/template_string                                                          ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/ref                                                                      ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/object_comprehension                                                     ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/object_comprehension_infix_value                                         ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/object_comprehension_infix_key                                           ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/array_comprehension                                                      ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/array_comprehension_nested_infix_operators                               ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/array_comprehension_non-infix_head                                       ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/array_comprehension_nested_infix_with_function_call                      ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/set_comprehension                                                        ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/not                                                                      ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/not,_explicit_body,_one-line                                             ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/not,_implicit_body,_multi-line                                           ~
NoASTTypeAllocatesOnAppendToBufferOfStringLength/not,_explicit_body,_multi-line                                           ~

This comment was automatically generated by the benchmarks workflow.

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

Successfully merging this pull request may close these issues.

2 participants