Add '--bail' option when running '--build' mode
See original GitHub issueSearch Terms
project references, bail, cascade, errors
Suggestion
When building multiple Typescript projects using the --build
flag, and the projects had dependencies on each other, an error in an upstream project can cause a cascade of errors from downstream projects that obscure the original error.
A possible solution would be a --bail
option (or however you’d like to name it). When provided in --build
mode, it would prevent all projects downstream from a project with an error from building. While this may hide downstream errors that are only found when re-running, it will prevent “false-positive” errors from being shown.
Use Cases
Using --build
mode on a large web of project references, without the possibility of being flooded with spurious errors due to one upstream typo.
Checklist
My suggestion meets these guidelines:
- This wouldn’t be a breaking change in existing TypeScript/JavaScript code
- This wouldn’t change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn’t a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript’s Design Goals.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top GitHub Comments
Ah, that’s a helpful distinction. Is there an existing way to suppress the warnings from indirect references, to match our desired behavior?
I believe I have a small repro of the issue we’re seeing.
In our repo, a single erroneous import can cause thousands of these errors.