Repository: microsoft/typescript-go (go)

Issue:
Fails silently when `compilerOptions.incremental = true`
When I set `compilerOptions.incremental` to true, this command fails silently with no output:
```
npx tsgo -p . --noEmit --extendedDiagnostics
```

Here's my whole tsconfig.json file:
```
{
  "include": ["."],
  "exclude": [
    "node_modules",
  ],
  "compilerOptions": {
    "incremental": true,
    "downlevelIteration": true,
    "lib": ["es2023", "dom"],
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "jsx": "react-jsx",
    "isolatedModules": true,
    "noEmit": true,
    "noImplicitAny": true,
    "noImplicitOverride": true,
    "strict": true,
    "target": "es2020",
    "module": "esnext",
    "moduleResolution": "Bundler",
    "resolveJsonModule": true,
    "baseUrl": ".",
  }
}
```

If I remove the `incremental: true` line, the above command runs and gives diagnostic output.

Pull request:
Don't error on --incremental, just run normally
This turns off the early exit and error for `--incremental`; I think it's fine to just let compilation proceed in this case.

Fixes #906

Patch:
diff --git a/internal/execute/system.go b/internal/execute/system.go
index ea0a43428..55ae2bb2e 100644
--- a/internal/execute/system.go
+++ b/internal/execute/system.go
@@ -27,5 +27,4 @@ const (
 	ExitStatusProjectReferenceCycle_OutputsSkipped ExitStatus = 4
 	ExitStatusNotImplemented                       ExitStatus = 5
 	ExitStatusNotImplementedWatch                  ExitStatus = 6
-	ExitStatusNotImplementedIncremental            ExitStatus = 7
 )
diff --git a/internal/execute/tsc.go b/internal/execute/tsc.go
index e26528f36..0b5203cd2 100644
--- a/internal/execute/tsc.go
+++ b/internal/execute/tsc.go
@@ -118,9 +118,8 @@ func executeCommandLineWorker(sys System, cb cbType, commandLine *tsoptions.Pars
 		// updateReportDiagnostic
 		if isWatchSet(configParseResult.CompilerOptions()) {
 			return ExitStatusSuccess, createWatcher(sys, configParseResult, reportDiagnostic)
-		} else if isIncrementalCompilation(configParseResult.CompilerOptions()) {
-			return ExitStatusNotImplementedIncremental, nil
 		}
+		// !!! incremental
 		return performCompilation(
 			sys,
 			cb,
@@ -136,9 +135,8 @@ func executeCommandLineWorker(sys System, cb cbType, commandLine *tsoptions.Pars
 		if isWatchSet(compilerOptionsFromCommandLine) {
 			// !!! reportWatchModeWithoutSysSupport
 			return ExitStatusSuccess, createWatcher(sys, commandLine, reportDiagnostic)
-		} else if isIncrementalCompilation(compilerOptionsFromCommandLine) {
-			return ExitStatusNotImplementedIncremental, nil
 		}
+		// !!! incremental
 	}
 	return performCompilation(
 		sys,


Test patch:
diff --git a/testdata/baselines/reference/tsc/noEmit/when-project-has-strict-true.js b/testdata/baselines/reference/tsc/noEmit/when-project-has-strict-true.js
index 5dcdf1e57..1a7e68f68 100644
--- a/testdata/baselines/reference/tsc/noEmit/when-project-has-strict-true.js
+++ b/testdata/baselines/reference/tsc/noEmit/when-project-has-strict-true.js
@@ -12,13 +12,12 @@ export class class1 {}
 	},
 }
 
-ExitStatus:: 7
+ExitStatus:: 0
 
 CompilerOptions::{
     "noEmit": true
 }
 Output::
-No output
 //// [/home/src/workspaces/project/class1.ts] no change
 //// [/home/src/workspaces/project/tsconfig.json] no change