-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Optimized bundle build doesn't respect rego.v1
and future.keywords
imports
#6450
Comments
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue. |
The build command respects the package test
p if {
input.x = 1
} Given this fact, I don't think it's crucial to solve this issue. |
@johanfylling regarding this issue, I've come to realize that the SDK during bundle plugin activation does not respect the V1 compatibility flag provided. This is because the So, if a build with the |
I am not totally sure that the problem I faced is really related to this issue. But anyway, I have provided a failing test case with the fix at #6689. Also, it seems to only happen when there are multiple bundles being loaded. Also, by taking a look at the logs it seems that OPA is mixing up the bundles together, because the syntax error logged is for a source code of a bundle other than the one the status is logged for. |
Your find in #6689 is unrelated to this issue. |
Prioritizing generating v0 Rego with `rego.v1` import when producing support modules for non-`--v1-compatible` optimized builds. Affects `opa build` when the `-O` flag is used for optimization, and `opa eval` for partial evaluation with the `-p` flag. Fixes: open-policy-agent#6450 Signed-off-by: Johan Fylling <[email protected]>
Prioritizing generating v0 Rego with `rego.v1` import when producing support modules for non-`--v1-compatible` optimized builds. Affects `opa build` when the `-O` flag is used for optimization, and `opa eval` for partial evaluation with the `-p` flag. Fixes: open-policy-agent#6450 Signed-off-by: Johan Fylling <[email protected]>
Prioritizing generating v0 Rego with `rego.v1` import when producing support modules for non-`--v1-compatible` optimized builds. Affects `opa build` when the `-O` flag is used for optimization, and `opa eval` for partial evaluation with the `-p` flag. Fixes: #6450 Signed-off-by: Johan Fylling <[email protected]>
When building a bundle from the following module with
opa build -O1
:the resulting optimized support module will drop the
rego.v1
import andif
keyword:The same issue occurs when the original module imports
future.keywords
instead ofrego.v1
.The text was updated successfully, but these errors were encountered: