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

Using run in (non-)sink context #12

Closed
AlexDaniel opened this issue Aug 21, 2017 · 0 comments
Closed

Using run in (non-)sink context #12

AlexDaniel opened this issue Aug 21, 2017 · 0 comments
Assignees
Labels
testneeded Issue is generally resolved but tests were not written yet

Comments

@AlexDaniel
Copy link
Member

Let's say we have these tasks:

task run, {
    run false; # FAIL!!!
}

task finish => run, {
    say finish
}

Try sake finish.
Some would argue that using run without checking the result is wrong. However, a typical makefile can have a lot of calls to other commands, and writing a check for each of them is probably an overkill given that failed procs will blow up in sink context anyway. But there is one issue which is demonstrated above. The last statement will be returned from the block, so it fails silently. It can be easily fixed by writing something like:

task run, {
    run false; # FAIL!!!
    True # ← make sure we are not sinking our proc
}

But I think that Sake can do something to prevent this trap.

@AlexDaniel AlexDaniel changed the title Using run in sink context Using run in (non-)sink context Aug 21, 2017
AlexDaniel added a commit to Raku/whateverable that referenced this issue Sep 29, 2017
AlexDaniel added a commit that referenced this issue Jun 22, 2018
Otherwise Procs can fail silently. See issue #12.
@AlexDaniel AlexDaniel added the testneeded Issue is generally resolved but tests were not written yet label Jun 22, 2018
@AlexDaniel AlexDaniel self-assigned this Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testneeded Issue is generally resolved but tests were not written yet
Projects
None yet
Development

No branches or pull requests

1 participant