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

pkg/compiler: relax the resource usage check #4590

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

a-nogikh
Copy link
Collaborator

If the resource is both generated and used in only optional contexts, it's an acceptable scenario. The change enables the cases when we use a single inout structure that sometimes uses a resource and sometimes creates it.

This PR approaches the same problem as #4580, but from a different side.

The function already has too many arguments.
If the resource is both generated and used in only optional contexts,
it's an acceptable scenario. The change enables the cases when we use a
single inout structure that sometimes uses a resource and sometimes
creates it.
@a-nogikh
Copy link
Collaborator Author

This PR relaxes the check on the pkg/compiler side, but we still get a resources_test.go:22: resource XXX can't be created failure from prog.

Maybe we should let pkg/compiler automatically mark resources for which we intentionally did not leave any non-optional constructors somewhere in prog.ResourceDesc?

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.

None yet

1 participant