-
Notifications
You must be signed in to change notification settings - Fork 5
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
unless the goal is required
#104
Comments
Thank you for your kind words and the proposal. Your guess of greedy However I totally agree that from a user perspective your request is completely valid and rational. I’ll check with implementation and will be glad if I can find a way to make it work this way without breaking things. Not only this is more logical but also should be more efficient. |
@reached_if
unless the goal is required
Interesting, that digging into this issue revealed other minor issue (now fixed). The loops were not reported properly in presence of @goal a
@reached_if true
@depends_on b
echo a
@goal b
@depends_on a
echo b |
Thanks for the brilliant tool.
I have a Makesurefile with goals that are intended to be executed in different environments. Concretely, there is a
@goal build
which I can run on my macOS laptop, and a@goal install
which only makes sense to run on my Debian server. The install goal has some transitive goals with@reached_if
directives that invokesystemctl
. When Imakesure build
on my laptop, I get some errors about systemctl not being installed. It seems that all@reached_if
directives in a Makesurefile are evaluated greedily, even if the requested goal wouldn't ever reach them. I guess that would ideally not be the case :)The text was updated successfully, but these errors were encountered: