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
Arbitrary vars in rule refs #5913
Merged
johanfylling
merged 34 commits into
open-policy-agent:main
from
johanfylling:jf/5685/multi-var-rule-refs
Aug 31, 2023
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
525c93d
topdown: Adding support for multiple variables in rule refs
johanfylling 5f70376
Merge branch 'main' into jf/5685/multi-var-rule-refs
johanfylling d387cfd
Updating commented-out tests.
johanfylling d1dcb03
Fixing yaml test expecting multiple results.
johanfylling 2073c3d
Not running yaml test for WASM
johanfylling 29c2a2e
Merge branch 'main' into jf/5685/multi-var-rule-refs
johanfylling 659ef2a
Moving type merge from `typeChecker.checkRule()` to `typeTreeNode.Ins…
johanfylling 692770e
Updating type-checker to handle generic rule refs
johanfylling 9707e66
Updating tests
johanfylling 391d469
Generalizing `types.Object.Merge()``
johanfylling ea52a01
Merging sub-objects in `types.Object.Merge()`
johanfylling 996cdec
Removing comment in test
johanfylling 1065755
Updating tests
johanfylling 67ba943
Aligning hint-key and entry for general refs on virtual partial eval
johanfylling 8ffcf1d
Enforcing no-else parser rule on general ref heads
johanfylling f02441d
PE impl
johanfylling 68f9436
Removing redundant legacy PE eval branch
johanfylling bec96d1
Fixing issue where PE-produced query contained non-namespaced local vars
johanfylling 33ebc2f
Adding PE tests
johanfylling 80620a0
Invoking evalOneRulePostUnify() for any ref with unknowns overlapping…
johanfylling 98178fb
fmt: Not using rule ref ground prefix if ref has dynamic part
johanfylling 372def8
Fixing linter warnings
johanfylling 9e544c6
Ignoring additional yaml tests not supported by Wasm
johanfylling 0fa5652
Merge branch 'main' into jf/5685/multi-var-rule-refs
johanfylling 52bb04d
Cleanup
johanfylling 18702a3
Producing cache hint keys containing entire applicable ref for genera…
johanfylling d4ac3b0
Merge branch 'main' into jf/5685/multi-var-rule-refs
johanfylling 9e46555
Updating type-tree construction
johanfylling e1c0a23
Merge branch 'main' into jf/5685/multi-var-rule-refs
johanfylling 2e7121b
Removing debug print
johanfylling a98a6ee
Merge branch 'main' into jf/5685/multi-var-rule-refs
johanfylling 9dcaac8
Adding docs
johanfylling c0d38ea
Merge branch 'main' into jf/5685/multi-var-rule-refs
johanfylling ebf1503
Making changes suggested by @srenatus
johanfylling File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks so wrong but
h
andj
could be rules defined somewhere in the package, right? 😅 (Not that it matters for formatting)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, this isn't internally consistent; but it's valid Rego, and for this rule we're more interested to see what the formatter does with the redundant
{ true }
body.