Skip to content

feat(plugin-js): js_typecheck driver, per-package tsc - #363

Closed
raphaelvigee wants to merge 1 commit into
raphaelvigee/feat-plugin-js-m2-import-graphfrom
raphaelvigee/feat-plugin-js-m3-typecheck
Closed

feat(plugin-js): js_typecheck driver, per-package tsc#363
raphaelvigee wants to merge 1 commit into
raphaelvigee/feat-plugin-js-m2-import-graphfrom
raphaelvigee/feat-plugin-js-m3-typecheck

Conversation

@raphaelvigee

@raphaelvigee raphaelvigee commented Aug 5, 2026

Copy link
Copy Markdown
Member

M3 of the JS/TS heph plugin plan (part 3/6 of the stack).

A cacheable js_typecheck ManagedDriver running tsc --noEmit per package, fed by the M2 import graph rather than blind package.json declarations.

  • Toolchain: tstool=host (only supported mode) resolves tsc from node_modules/.bin or PATH, queried once per Provider lifetime and hashed alongside the tsconfig content — disclosed non-hermetic escape hatch.
  • Input scoping fixed through review to actually match what tsc reads: plain (non-type-only) cross-package imports, not just import type; third-party .d.ts inputs resolved via the same lockfile mechanism as js_install; tsconfig include/exclude honored; the full tsconfig extends chain declared and hashed; a shared/ancestor tsconfig with unscoped include is now a loud Provider::get error instead of a silently unsound cache key.

Reviewed by feature-quality/code-quality/hermeticity — five BLOCKERs found (all variations on "the declared Input set doesn't match what tsc actually reads") and fixed, each with a regression test proving the specific divergence. Tests requiring a real tsc binary are #[ignore]d with a named reason rather than silently skipping and reading as a pass.

Test plan

  • cargo build -p plugin-js -p plugin-js-cdylib
  • cargo test -p plugin-js
  • cargo clippy -p plugin-js -p plugin-js-cdylib --all-targets -- -D warnings
  • cargo fmt --check -p plugin-js -p plugin-js-cdylib

Stack created with GitHub Stacks CLIGive Feedback 💬

@raphaelvigee
raphaelvigee force-pushed the raphaelvigee/feat-plugin-js-m3-typecheck branch from 9bdf419 to 6627d07 Compare August 7, 2026 11:21
@raphaelvigee
raphaelvigee marked this pull request as ready for review August 7, 2026 12:57
@raphaelvigee
raphaelvigee force-pushed the raphaelvigee/feat-plugin-js-m3-typecheck branch from 6627d07 to 93c5768 Compare August 7, 2026 12:58
@raphaelvigee
raphaelvigee force-pushed the raphaelvigee/feat-plugin-js-m3-typecheck branch 2 times, most recently from 8e3c894 to 861c985 Compare August 7, 2026 18:31
M3 of the JS/TS plugin: a cacheable js_typecheck ManagedDriver running
tsc --noEmit per package, fed by the M2 import graph rather than blind
package.json declarations.

- Toolchain: tstool=host (only supported mode) resolves tsc from
  node_modules/.bin or PATH, queried once per Provider lifetime and hashed
  alongside the tsconfig content — disclosed non-hermetic escape hatch,
  same shape as the design doc's stated M1+ gap.
- Input scoping fixed through review to actually match what tsc reads:
  plain (non-type-only) cross-package imports, not just `import type`;
  third-party .d.ts inputs resolved via the same lockfile mechanism as
  js_install (works with no ambient node_modules, not just when one
  happens to exist on disk); tsconfig include/exclude honored for
  first-party sources; the full tsconfig extends chain declared and
  hashed; a shared/ancestor tsconfig with unscoped include is now a loud
  Provider::get error instead of a silently unsound cache key.

Reviewed by feature-quality/code-quality/hermeticity — five BLOCKERs found
(all variations on "the declared Input set doesn't match what tsc actually
reads") and fixed, each with a regression test proving the specific
divergence. Tests requiring a real tsc binary are #[ignore]d with a named
reason rather than silently skipping and reading as a pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M3wZfyPsG8stfRQuybLRjN
@raphaelvigee
raphaelvigee force-pushed the raphaelvigee/feat-plugin-js-m3-typecheck branch from 861c985 to c76de6b Compare August 7, 2026 19:56
@raphaelvigee

Copy link
Copy Markdown
Member Author

Superseded by #370 — the whole stack was squash-collapsed into a single PR rebased on master, per request.

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.

1 participant