tsc --watch never recompiles on macOS since 7.1.0-dev.20260811.1
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go, macos, typescript
- Ambito
- compilers, operating-systems
Direzione di ricerca
Start with the provided macOS shell repro using tsc --watch, then compare behavior between the last good and first bad nightly. Inspect the watch-mode changes in the listed regression commits, especially the macOS realpath change, and verify that edits, new files, tsconfig changes, and deletions trigger recompilation with the expected diagnostic.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🔎 Search Terms
--watchnever recompilestsc --watchmacOS no file change detected--build --watchmacOS regression7.1.0-dev.20260811.1
🕗 Version & Regression Information
- Broken in every nightly from
7.1.0-dev.20260811.1through7.1.0-dev.20260919.1(@typescript/typescript-darwin-x64) - Works in
7.1.0-dev.20260810.1and in@typescript/native-preview7.0.0-dev.20260707.2 - Bisected across the published nightlies: last good
7.1.0-dev.20260810.1(published 2026-08-10T08:17Z), first bad7.1.0-dev.20260811.1(published 2026-08-11T08:18Z) - macOS 26.6.2 (x64, APFS); TypeScript 5.9.3
tsc --watchworks in the same shell
Commits on main between the two nightly builds:
- 40af284bf Handle extensionless root files gracefully instead of panicking (microsoft/typescript-go#4628)
- 5cad7ecba Fall back to inotify when filesystem has errors in fanotify (fix watch in Docker) (microsoft/typescript-go#4661)
- b7045b4c0 Fix watch diagnostics when global declaration is removed (microsoft/typescript-go#4848)
- 1adcc6258 Preserve await context for exported classes in nested containers (microsoft/typescript-go#4823)
- 3c315b7dd Account nested declaration emits as emit time (microsoft/typescript-go#4557)
- a649b1fd4 Remove macOS realpath fast path (microsoft/typescript-go#4867)
- bbf7371f5 Port transpileModule, transpileDeclaration (microsoft/typescript-go#4849)
- 56244ebe9 Split heritage clause expression and type nodes (microsoft/typescript-go#4797)
⏯ Playground Link
n/a (watch mode)
💻 Code
mkdir repro && cd repro
echo '{ "compilerOptions": { "strict": true, "noEmit": true }, "include": ["*.ts"] }' > tsconfig.json
echo 'export const a: number = 1;' > a.ts
tsc --watch --pretty false &
sleep 2
echo 'export const a: number = "x";' > a.ts
sleep 10
🙁 Actual behavior
11:33:16 AM - Starting compilation in watch mode...
11:33:16 AM - Found 0 errors. Watching for file changes.
Nothing else is ever printed. The edited file is not re-checked and TS2322 never appears. A second edit, creating a new b.ts, editing tsconfig.json and deleting a file are all ignored as well. tsc --build --watch behaves the same.
Things that make no difference:
--watchFile fixedpollinginterval,dynamicprioritypolling,prioritypollinginterval,usefseventsonparentdirectory(and--watchDirectory fixedpollinginterval): the options are accepted, the behaviour is identical- Directory shape: an all-lowercase directory with no symlink in its path (
/private/tmp/tsrx-watch-lower), a mixed-case one (/private/tmp/tsrx-Watch-Upper), a path through the/tmpsymlink, a path under$HOME, and a firmlink-prefixed path (/System/Volumes/Data/...) all fail the same way - stdin: closed (
/dev/null) or kept open as a pipe - With or without a content mapper in the project
So this looks different from #64089 (dropped FSEvents when casing differs), although the regression window contains the realpath change that issue mentions (a649b1fd4).
On 7.1.0-dev.20260810.1 the same steps print File change detected. Starting incremental compilation... and the TS2322 error about 2 seconds after the edit.
🙂 Expected behavior
Watch mode recompiles after the edit and reports the error, as 7.1.0-dev.20260810.1 and TypeScript 5.9 do.
Additional information about the issue
Only macOS was tested (Intel, macOS 26.6.2). Found while building the .tsrx content mapper for TSRX (tsrx-org/tsrx#41), where the --watch test can only assert the initial compilation.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.4k
- Merge medio
- 1g 15h
- PR unite (30g)
- 106
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/TypeScript
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
microsoft/TypeScript#64322 · 2 commenti · 1 reazione · 2 assegnatari ·
-
Possible Improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/TypeScript#64278 · 1 commento · 1 reazione ·
-
Docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
microsoft/TypeScript#64118 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
microsoft/TypeScript#64094 ·
-
Docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
microsoft/TypeScript#63959 · 5 commenti ·
Tutte le issue di microsoft/TypeScript
Issue simili
-
Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenNSW/nsw-srilanka#497 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
milvus-io/birdwatcher#545 ·
-
kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
kubernetes-sigs/prow#953 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
caddyserver/caddy#8046 ·