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

Cannot build plan/wasm when function references data document and entrypoint is the package #5028

Closed
johanfylling opened this issue Aug 22, 2022 · 1 comment
Labels

Comments

@johanfylling
Copy link
Contributor

When the following policy:

package test

foo(_) := bar
bar := 1337

is built targeting wasm or plan, with the package assigned as entrypoint:

opa build -t wasm -e "test" test.rego

we get the following error:

error: 1 error occurred: test.rego:1: rego_type_error: undefined ref: data.test.foo
	data.test.foo
	^^^^^^^^^^^^^
	have: (any) => number
@srenatus
Copy link
Contributor

Build target "plan" wasn't a thing back then, but this has been reported before: #4411.

@srenatus srenatus closed this as not planned Won't fix, can't repro, duplicate, stale Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants