From c297971f130d183cb0f39fa1a8991d0728e96340 Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Thu, 22 Oct 2026 07:41:13 -0500 Subject: [PATCH] Report JSX-lowered files to the checker server as changed The program the lowering compiles serves each file that has JSX at its own path, with the JSX rewritten to calls (host.addVirtualFile). The host reported such a path to the checker server as created whenever it was not virtual yet. The files exist on disk and the server had already read them for the program that checks them as written, so tsgo kept their original text, and lowering met the JSX syntax: SC1090 "syntax 'JsxFragment' is not supported yet" in 6822, 6824 and 6825 under SCRIPTC_CHECKER=tsgo, while tsc-ts reread the files. A virtual file that replaces a file on disk is now reported as changed, and both checkers give the same LLVM IR and diagnostics for the JSX corpus programs. --- packages/compiler/src/frontend/ts7/program-host.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/compiler/src/frontend/ts7/program-host.ts b/packages/compiler/src/frontend/ts7/program-host.ts index c87da0bfe..639086e94 100644 --- a/packages/compiler/src/frontend/ts7/program-host.ts +++ b/packages/compiler/src/frontend/ts7/program-host.ts @@ -192,7 +192,10 @@ export class Ts7Host { const key = tsgoPath(path); if (this.virtualFiles.get(key) === content) return; if (!this.virtualChanges.has(key)) - this.virtualChanges.set(key, this.virtualFiles.has(key) ? "changed" : "created"); + this.virtualChanges.set( + key, + this.virtualFiles.has(key) || trackedFileExists(path) ? "changed" : "created", + ); this.virtualFiles.set(key, content); }