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

feat(recursive): new option for continuing execution on task fails #1287

Closed
wants to merge 2 commits into from

Conversation

zkochan
Copy link
Member

@zkochan zkochan commented Jul 16, 2018

TODO:

  • support pnpm recursive exec
  • support pnpm recursive run
  • support pnpm recursive test
  • support pnpm recursive rebuild

@zkochan zkochan requested a review from vjpr July 16, 2018 20:37
@zkochan
Copy link
Member Author

zkochan commented Jul 16, 2018

@vjpr I used the flag name --no-bail (like in lerna) but I don't know if that is a good name. Is there some standard name for such flags?

npm-run-all uses --continue-on-error which I like more as it is more explicit.

Also, I did it so that all tasks will finish but if at least one failed, pnpm will exit with a non-zero exit code, which seems like expected to me.

@zkochan zkochan requested a review from etamponi July 16, 2018 20:40
@zkochan zkochan added area: monorepo Everything related to the pnpm workspace feature type: feature labels Jul 16, 2018
@zkochan
Copy link
Member Author

zkochan commented Jul 16, 2018

Probably it would be useful to print a summary of failed packages in the end. Something like:

Summary: 2 failed, 6 completed

x /packages/foo:
  ERROR ....

x /packages/bar:
  ERROR ...

@vjpr
Copy link
Contributor

vjpr commented Jul 17, 2018

I like --continue-on-error.


PS. gcc uses -Wfatal-errors to fail on first error, but this is ugly. They also have fmax-errors=n, to fail after X number of errors.

@zkochan
Copy link
Member Author

zkochan commented Jul 17, 2018

I've seen also somewhere the flag --fast-fail
it would be --no-fast-fail then

@zkochan
Copy link
Member Author

zkochan commented Jul 17, 2018

@vjpr seems like --bail is also used by jest and mocha, so it is more widely used. I would stick with it

bail is true by default. bail means that a recursive command is
terminated on the first fail.

Usage example:

```
pnpm recursive test --no-bail
```
@zkochan
Copy link
Member Author

zkochan commented Jul 19, 2018

merged

@zkochan zkochan closed this Jul 19, 2018
zkochan added a commit that referenced this pull request Jul 19, 2018
bail is true by default. bail means that a recursive command is
terminated on the first fail.

Usage example:

```
pnpm recursive test --no-bail
```

PR #1287
@zkochan
Copy link
Member Author

zkochan commented Aug 5, 2018

🚢 2.13.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: monorepo Everything related to the pnpm workspace feature type: feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants