Skip to content

TS file watching busted with Electron 6 #81516

@mjbvz

Description

@mjbvz

Tracks the VS Code side of microsoft/TypeScript#33564

Repo
On MacOS with VS Code insiders

For the project:

tsconfig.js

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es2016",
        "jsx": "react"
    }
}

src/main.ts

export function foo() {
    add
}
  1. Open main.ts
  2. Create a new file src/add.ts in VS Code
export function add() { }
  1. Back in main.ts, try auto importing add

    🐛 Doesn't show up

  2. In add, run the TypeScript: Go to project configuration command. This should open the tsconfig.json

    🐛 File is not part of any project

Investigation
Something seems busted with using any version of TypeScript + Electron 6 on MacOS. I've tested the following cases so far:

  • MacOS, newest TS with VS Code Stable — ✅ works
  • MacOS, stable TS with VS Code Stable — ✅ works
  • MacOS, stable TS with VS Code insides — ❌ broken
  • MacOS, newest TS with VS Code insides — ❌ broken
  • MacOS, TS 3.3 (an old version) with VS Code insiders — ❌ broken
  • Windows, any TS with VS Code Insiders — ✅ works

Behind the scenes, TS uses node's fs.watch by default so I suspect the bug is somewhere with that not firing events properly

As @RyanCavanaugh and @sheetalkamat brought up, we cannot fix this on the TS side old TS versions are also broken

Metadata

Metadata

Assignees

Labels

electronIssues and items related to Electronelectron-blockerIssues in next update of Electron preventing updateupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions