Hey everyone, maybe it's a simple question: is the...
# general
a
Hey everyone, maybe it's a simple question: is there a way to make Pants continue applying the goal to all targets regardless of failures? For instance, I need Pants to
package
(
publish
) the rest of the targets, even if one fails. Does it maybe have to be sequentially manages with
list
and single
package
commands?
a
I'm also interested in having a flag that enables such a mode of execution, haven't found a nice UX way of doing it today beside single
package
commands like @adventurous-rain-63973 says
h
It depends on the target.
test
, for example, will try and run as many tests as possible and doesn’t stop on failure.
package
should run on all targets concurrently and not fail the run if one package fails, I think
but
publish
definitely doesn’t - it is conservative, because it runs the publish actions sequentially
For example, if you publish A and B, and B depends on A, and you fail to publish A, then it is an error to publish B
Since it will declare a dependency on A, which doesn’t exist
But I am surprised that
package
doesn’t do what you expect, let me take a look
Ah, OK, so
package
does technically succeed in packaging all the targets that succeed, but it then doesn’t write the packaged files out to
dist/
if any one of them fails
so it sounds like that’s what you want
a
Thanks @happy-kitchen-89482 , so it has to be
publish
to fail at the first problem. I'll try to split into separate commands then...
h
Well,
package
won’t write any packages out to
dist/
if any fail, but the work it does to get that far will be cached, so once you fix the issue and re-run
package
you should get a quick short-circuit to a full
dist/
👍 1