Skip to content

Conversation

@jakebailey
Copy link
Member

Much simplified version of #1176.

--checkers controls how many checkers are created in a Program during a non-editor compile. The default is still 4. Parse/bind/emit are still massively-concurrent.

If you pass --singleThreaded, everything is still single threaded as before; checkers will be forced to 1 and all normally concurrent operations will instead proceed in a deterministic order.

Intended to be used in tandem with a not-yet-existing --builders flag for controlling -b concurrency (probably via a revived #1692; @sheetalkamat).

Copilot AI review requested due to automatic review settings October 30, 2025 18:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new --checkers command-line option that allows users to configure the number of type checkers per program, providing more granular control over parallelism than the existing --singleThreaded flag.

  • Introduces a new --checkers compiler option with proper parsing and validation
  • Implements the logic to use the configured checker count in program initialization
  • Updates baselines for command-line help output to reflect the new option

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/core/compileroptions.go Adds the Checkers field to store the configured number of checkers
internal/compiler/program.go Implements logic to use the Checkers option with a minimum value of 1
internal/tsoptions/parsinghelpers.go Adds parsing logic for the checkers option
internal/tsoptions/declscompiler.go Defines the command-line option declaration for --checkers
internal/diagnostics/extraDiagnosticMessages.json Adds diagnostic messages for the option description and default value
internal/diagnostics/diagnostics_generated.go Generated diagnostic message constants
testdata/baselines/reference/tsc/commandLine/help-all.js Updated baseline showing the new option in help output
testdata/baselines/reference/tsbuild/commandLine/help.js Updated baseline showing the new option in help output

@jakebailey jakebailey added this pull request to the merge queue Oct 31, 2025
Merged via the queue into main with commit 71a622f Oct 31, 2025
22 checks passed
@jakebailey jakebailey deleted the jabaile/compiler-options-checkers branch October 31, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants