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

Don't evaluate @reached_if until the #105

Closed
08d2 opened this issue Feb 7, 2022 · 2 comments
Closed

Don't evaluate @reached_if until the #105

08d2 opened this issue Feb 7, 2022 · 2 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@08d2
Copy link

08d2 commented Feb 7, 2022

I have goals which, when executed, change the result of @reached_if directives further down in the dependency graph. But those @reached_if conditions appear to be evaluated once at execution start, so those changes aren't "picked up" until the next execution. Ideally, @reached_if would be evaluated only when execution reaches that goal.

@xonixx
Copy link
Owner

xonixx commented Feb 7, 2022

The rule of thumb should be that @reached_if can only rely on condition that is changed by the owning goal. This is what makes the tool sort of declarative. If we allow what you propose - this introduces imperative semantics into execution model (execution of a goal relies on previous execution of other goals and overall on goal execution order), which is not desirable.

I would propose to re-structure your goals logic to respect the rule of thumb above.
I can try to provide better advice if you post some sample codes that demonstrate your issue.

@xonixx xonixx changed the title Don't evaluate @reached_if until the Don't evaluate @reached_if until the Feb 7, 2022
@08d2
Copy link
Author

08d2 commented Feb 7, 2022

I see. I think it should be reasonably straightforward to break up the goals which exhibit this behavior 👍 Thanks!

@08d2 08d2 closed this as completed Feb 7, 2022
@xonixx xonixx self-assigned this Aug 11, 2022
@xonixx xonixx added the wontfix This will not be worked on label Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants