open-policy-agent/opa

Optimized bundle build doesn't respect `rego.v1` and `future.keywords` imports

johanfylling opened this issue · 5 comments

When building a bundle from the following module with opa build -O1:

package test

import rego.v1

# METADATA
# entrypoint: true
p if {
    input.x == 1
}

the resulting optimized support module will drop the rego.v1 import and if keyword:

package test

p {
    input.x = 1
}

The same issue occurs when the original module imports future.keywords instead of rego.v1.

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.