microsoft / microsoft/TypeScript

Provide per-project build progress in `tsc -b`

Open
#53,763 3 comments 18 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

Suggestion

🔍 Search Terms

tsc diagnostics tsc progress

✅ Viability 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, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

Please consider printing by default (in TTY mode) progress about solution compilation. It would be a minimalistic version of --diagnostics flag.

Also note that currently --diagnostics is not easily usable for tsc -b because it does not say which project each statistics belong to.

📃 Motivating Example

I patched tsc to print out every project that it will build and that prints time spent for each project. It can be done via simple xterm commands, no need for any dependencies.

image

💻 Use Cases

This has helped us to:

  • realize that some packages were never cached but always rebuilt (seems because of overlapping included files)
  • see just how long some common reused packages compile vs the consumers
  • visualize the dependency graph, allowing developers to see that they are including references they really don't need.

Overall this has been eye opening in regards to what contributes to our build times.

As mentioned above --diagnostics could be used to achieve this (though it is bit too verbose to get an overview and it is optional) however it not printing the project name is a blocker to use it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tsc -b entry point and existing --diagnostics behavior, focusing on how solution projects are identified and how their statistics are reported. Done means TTY output provides per-project build progress by default and diagnostics can be associated with the project they describe.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.