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

Fail early when building dependent projects #178

Closed
jeffrson opened this issue Feb 24, 2022 · 1 comment
Closed

Fail early when building dependent projects #178

jeffrson opened this issue Feb 24, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jeffrson
Copy link

Is your feature request related to a problem? Please describe.

Say, there are 4 projects in a mono-repo: prj1, prj2 (depending on prj1), prj3 (depending on prj1), prj4 (depending on prj2, prj3).
Currently, afaict, from my real world mono-repo, prj1 is built, then prj2 and prj3, then prj4 - even if prj1 fails to build! Even more, it seems, that the cached file information prevents another build (such that "-r" needs to be used).

Describe the solution you'd like
yarn.build should fail as soon as possible. If there are some projects built in parallel those should not be stopped of course:
prj1 fails - no other prj will be built
prj2 fails - prj1 had been built before, proj3 will be built, prj4 will not be built

Cache information will only be written for projects that have been built successfully.

Describe alternatives you've considered
none

Additional context
none

@jeffrson jeffrson added the enhancement New feature or request label Feb 24, 2022
@ojkelly ojkelly self-assigned this Feb 26, 2022
@ojkelly
Copy link
Owner

ojkelly commented Feb 26, 2022

Thanks for this report, I had noticed some similar behaviour. I think I've fixed this in the next release, including preventing dependencies from being built of a failed build.

yarn build --bail didn't work correctly, has been fixed, and is now the default. --bail isn't needed just yarn build will do it.

yarn build --continue-on-error will allow the previous behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants