-
Notifications
You must be signed in to change notification settings - Fork 748
Closed
Description
Apply this patch to disable the code that merges errors for multiple checkers in a single file, and unskips the tests that fail with it.
Then, run hereby test --concurrentTestPrograms
diff --git a/internal/compiler/program.go b/internal/compiler/program.go
index 2dbe96c47..d0f364076 100644
--- a/internal/compiler/program.go
+++ b/internal/compiler/program.go
@@ -1034,7 +1034,7 @@ func (p *Program) getSemanticDiagnosticsForFileNotFilter(ctx context.Context, so
if sourceFile == nil || checker == fileChecker {
checkerDiags[idx] = checker.GetDiagnostics(ctx, sourceFile)
} else {
- checkerDiags[idx] = checker.GetDiagnosticsWithoutCheck(sourceFile)
+ // checkerDiags[idx] = checker.GetDiagnosticsWithoutCheck(sourceFile)
}
})
if ctx.Err() != nil {
diff --git a/internal/testrunner/compiler_runner.go b/internal/testrunner/compiler_runner.go
index a79e1874a..8e2c60bb4 100644
--- a/internal/testrunner/compiler_runner.go
+++ b/internal/testrunner/compiler_runner.go
@@ -351,8 +351,8 @@ func newCompilerTest(
}
var concurrentSkippedErrorBaselines = map[string]string{
- "typeOnlyMerge2.ts": "Type-only merging is not detected when files are checked on different checkers.",
- "typeOnlyMerge3.ts": "Type-only merging is not detected when files are checked on different checkers.",
+ // "typeOnlyMerge2.ts": "Type-only merging is not detected when files are checked on different checkers.",
+ // "typeOnlyMerge3.ts": "Type-only merging is not detected when files are checked on different checkers.",
}
func (c *compilerTest) verifyDiagnostics(t *testing.T, suiteName string, isSubmodule bool) {You'll get these four tests failing:
=== Failed
=== FAIL: internal/testrunner TestSubmodule/objectTypeHidingMembersOfExtendedObject.ts/error (0.00s)
baseline.go:206: the baseline file /home/jabaile/work/TypeScript-go/testdata/baselines/reference/submodule/conformance/objectTypeHidingMembersOfExtendedObject.errors.txt has changed. (Run `hereby baseline-accept` if the new baseline is correct.)
baseline.go:201: new baseline created at /home/jabaile/work/TypeScript-go/testdata/baselines/local/submodule/conformance/objectTypeHidingMembersOfExtendedObject.errors.txt.diff.
=== FAIL: internal/testrunner TestSubmodule/duplicateNumericIndexers.ts/error (0.00s)
baseline.go:206: the baseline file /home/jabaile/work/TypeScript-go/testdata/baselines/reference/submodule/conformance/duplicateNumericIndexers.errors.txt has changed. (Run `hereby baseline-accept` if the new baseline is correct.)
baseline.go:201: new baseline created at /home/jabaile/work/TypeScript-go/testdata/baselines/local/submodule/conformance/duplicateNumericIndexers.errors.txt.diff.
=== FAIL: internal/testrunner TestSubmodule/objectTypeHidingMembersOfExtendedObject.ts (0.62s)
=== FAIL: internal/testrunner TestSubmodule/duplicateNumericIndexers.ts (0.64s)
=== FAIL: internal/testrunner TestSubmodule/typeOnlyMerge3.ts/error (0.00s)
baseline.go:206: the baseline file /home/jabaile/work/TypeScript-go/testdata/baselines/reference/submodule/conformance/typeOnlyMerge3.errors.txt has changed. (Run `hereby baseline-accept` if the new baseline is correct.)
baseline.go:201: new baseline created at /home/jabaile/work/TypeScript-go/testdata/baselines/local/submodule/conformance/typeOnlyMerge3.errors.txt.diff.
=== FAIL: internal/testrunner TestSubmodule/typeOnlyMerge3.ts (0.00s)
=== FAIL: internal/testrunner TestSubmodule/typeOnlyMerge2.ts/error (0.00s)
baseline.go:206: the baseline file /home/jabaile/work/TypeScript-go/testdata/baselines/reference/submodule/conformance/typeOnlyMerge2.errors.txt has changed. (Run `hereby baseline-accept` if the new baseline is correct.)
baseline.go:201: new baseline created at /home/jabaile/work/TypeScript-go/testdata/baselines/local/submodule/conformance/typeOnlyMerge2.errors.txt.diff.
=== FAIL: internal/testrunner TestSubmodule/typeOnlyMerge2.ts (0.01s)
=== FAIL: internal/testrunner TestSubmodule (1.76s)
If we were to fix the checker so it is able to issue errors everywhere and consistently like in #1904, we can probably eliminate the need to merge diagnostics between checkers for the same file, and then drop certain locking we have to do (and maybe eventually make Program not own checkers at all). This also would continue to harden us in the editor.
Metadata
Metadata
Assignees
Labels
No labels