microsoft / microsoft/TypeScript
Add '--bail' option when running '--build' mode
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Search 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the TypeScript command-line handling for --build and trace how project references are built in dependency order. Reproduce the cascade with multiple referenced projects and an upstream error, then determine how a --bail option should stop downstream builds. Done means the option works in --build mode without changing existing behavior when it is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100