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

Apply copy propagation to support rules #914

Merged
merged 1 commit into from
Aug 30, 2018

Conversation

tsandall
Copy link
Member

Previously copy propagation was only being applied to queries returned
by partial eval. The assumption was that clients would typically be
implemented to deal with queries and that support rules would be
unhandled. In some cases though, clients may be capable of handling
support rules. For them, it's better if we apply copy propagation to
both queries and rule bodies.

Note, we ensure that rule bodies are non-empty so that comparisons to
parsed rules that are equivalent (but lacking a body) succeed.

Fixes #911

Previously copy propagation was only being applied to queries returned
by partial eval. The assumption was that clients would typically be
implemented to deal with queries and that support rules would be
unhandled. In some cases though, clients may be capable of handling
support rules. For them, it's better if we apply copy propagation to
both queries and rule bodies.

Note, we ensure that rule bodies are non-empty so that comparisons to
parsed rules that are equivalent (but lacking a body) succeed.

Fixes open-policy-agent#911

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
@tsandall tsandall merged commit 4c8541b into open-policy-agent:master Aug 30, 2018
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.

1 participant