Skip to content

Commit 039a183

Browse files
committed
chore(typecheck): use native Effect diagnostics in tsc-rs
1 parent a7ce09c commit 039a183

5 files changed

Lines changed: 23 additions & 34 deletions

File tree

‎docs/operations/development.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,12 @@ vp lint <files>
106106
vp run --filter <package> typecheck
107107
```
108108

109-
TypeScript workspaces use pinned tsc-rs on macOS ARM64 and Linux x64, followed by
110-
a separate Effect diagnostics pass. Other platforms keep Effect-patched TypeScript
109+
TypeScript workspaces use pinned tsc-rs on macOS ARM64 and Linux x64, with Effect
110+
diagnostics built in. Other platforms keep Effect-patched TypeScript
111111
until tsc-rs ships their binaries. Custom compiler flags also use that compiler,
112112
including watch mode. Keep `typescript`, `@effect/tsgo`, and the
113-
`effect-tsgo patch` prepare step: they provide Effect diagnostics and editor support.
113+
`effect-tsgo patch` prepare step: they provide the fallback compiler and Effect
114+
editor features that tsc-rs does not yet include.
114115
Marketing keeps `astro check` for Astro files.
115116

116117
Use `vp run lint:mobile` for native mobile changes. CI owns the full suite; see

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@shadcn/lint": "0.1.5",
5757
"@types/node": "catalog:",
5858
"knip": "6.34.0",
59-
"tsc-rs": "0.1.0-preview.2",
59+
"tsc-rs": "0.1.0",
6060
"typescript": "catalog:",
6161
"vite-plus": "catalog:"
6262
},

‎pnpm-lock.yaml‎

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ catalog:
5959
yaml: ^2.9.0
6060

6161
minimumReleaseAgeExclude:
62-
- [email protected]-preview.2
63-
- "@tsc-rs/[email protected]-preview.2"
64-
- "@tsc-rs/[email protected]-preview.2"
62+
63+
- "@tsc-rs/[email protected]"
64+
- "@tsc-rs/[email protected]"
6565
6666
6767

‎scripts/typecheck.ts‎

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,12 @@ const supportsRust =
2727
(platform === "linux" && architecture === "x64");
2828

2929
if (supportsRust && extraArgs.length === 0) {
30-
const compilerStatus = runCompiler("../node_modules/tsc-rs/bin/tsc-rs", ["--noEmit"]);
31-
// tsc-rs does not include the Effect language service. Keep its full diagnostic
32-
// pass, including suggestions, and fail on warnings as the patched tsc does.
33-
// Run both passes even when the Rust compiler reports an error.
34-
const effectStatus = runCompiler("../node_modules/@effect/tsgo/dist/effect-tsgo.cjs", [
35-
"diagnostics",
36-
"--project",
37-
"tsconfig.json",
38-
"--strict",
39-
"--format",
40-
"text",
41-
]);
42-
process.exitCode = compilerStatus || effectStatus;
30+
process.exitCode = runCompiler("../node_modules/tsc-rs/bin/tsc-rs", ["--noEmit"]);
4331
} else {
4432
process.stderr.write(
4533
supportsRust
4634
? "Custom compiler arguments use Effect-patched TypeScript.\n"
47-
: `tsc-rs preview has no ${platform}-${architecture} binary; using Effect-patched TypeScript.\n`,
35+
: `tsc-rs has no ${platform}-${architecture} binary; using Effect-patched TypeScript.\n`,
4836
);
4937
process.exitCode = runCompiler("../node_modules/typescript/bin/tsc", ["--noEmit", ...extraArgs]);
5038
}

0 commit comments

Comments
 (0)