Skip to content

feat(ts): ts.check names the type checker TsgoCheck runs - #376

Merged
mikn merged 3 commits into
mainfrom
rapha/check-binary
Nov 2, 2026
Merged

mikn merged 3 commits into
mainfrom
rapha/check-binary

Conversation

@raphamorim

@raphamorim raphamorim commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

ts.check(binary, args) names the program the TsgoCheck validation action runs instead of the tsgo toolchain's compiler. Without it nothing changes.

ts.check(
    binary = "//crates/oj:typecheck",
    args = ["typecheck"],
)
  • The checker gets args, then the command line tsgo gets (--project <cfg> --noEmit --explainFiles --pretty false, plus --checkers N), and has to print and exit as tsgo does: the action still parses its --explainFiles listing for the strict-deps check. oj typecheck (oj 0.4.0+) does that.
  • Only TsgoCheck changes. Declaration emit (TsgoDeclare), the editor project and Gazelle stay on tsgo, so the tsgo toolchain is still required.
  • --@rules_typescript//ts:check=@rules_typescript//ts:tsgo_check runs one build on tsgo whatever the module names, for comparing the two.
  • Same shape as ts.lint: a check_config repo from the extension, a //ts:check label flag, and a CheckConfigInfo provider on ts_compile's _check attribute.

Docs: docs/guides/check.md. Changelog: changelog.d/check-binary.md.

Tests (tests/check): with a fake checker, TsgoCheck's argv after -- is the checker, its args, then --project, with --noEmit and --explainFiles, and the checker is an action input; TsgoDeclare and the IDE project keep tsgo; the tsgo_check config puts tsgo back. bazel test //tests/check/... //tests/checkers/... //tests/lint/... passes.

@raphamorim
raphamorim requested a review from mikn as a code owner October 30, 2026 20:34
@mikn
mikn merged commit 5d5fba8 into main Nov 2, 2026
17 checks passed
@raphamorim
raphamorim deleted the rapha/check-binary branch November 2, 2026 14:52
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.

2 participants