Skip to content

tsc --watch never recompiles on macOS since 7.1.0-dev.20260811.1 #64351

Description

@leonidaz

🔎 Search Terms

  • --watch never recompiles
  • tsc --watch macOS no file change detected
  • --build --watch macOS regression 7.1.0-dev.20260811.1

🕗 Version & Regression Information

  • Broken in every nightly from 7.1.0-dev.20260811.1 through 7.1.0-dev.20260919.1 (@typescript/typescript-darwin-x64)
  • Works in 7.1.0-dev.20260810.1 and in @typescript/native-preview 7.0.0-dev.20260707.2
  • Bisected across the published nightlies: last good 7.1.0-dev.20260810.1 (published 2026-08-10T08:17Z), first bad 7.1.0-dev.20260811.1 (published 2026-08-11T08:18Z)
  • macOS 26.6.2 (x64, APFS); TypeScript 5.9.3 tsc --watch works in the same shell

Commits on main between the two nightly builds:

⏯ 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 /tmp symlink, 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 (a649b1f).

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions