This repository was archived by the owner on Sep 1, 2026. It is now read-only.
Return empty diags for files with skipped checking - #763
Merged
Merged
Conversation
Jake Bailey (jakebailey)
requested review from
Anders Hejlsberg (ahejlsberg),
Andrew Branch (andrewbranch) and
Copilot
April 7, 2025 20:07
Contributor
There was a problem hiding this comment.
Copilot reviewed 3 out of 13 changed files in this pull request and generated no comments.
Files not reviewed (10)
- testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.errors.txt: Language not supported
- testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.errors.txt.diff: Language not supported
- testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithComputedPropertyName.errors.txt: Language not supported
- testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithComputedPropertyName.errors.txt.diff: Language not supported
- testdata/baselines/reference/submodule/conformance/plainJSRedeclare3.errors.txt: Language not supported
- testdata/baselines/reference/submodule/conformance/plainJSReservedStrict.errors.txt: Language not supported
- testdata/baselines/reference/submodule/conformance/ts-expect-error-nocheck-js.errors.txt: Language not supported
- testdata/baselines/reference/submoduleAccepted/conformance/plainJSRedeclare3.errors.txt.diff: Language not supported
- testdata/baselines/reference/submoduleAccepted/conformance/plainJSReservedStrict.errors.txt.diff: Language not supported
- testdata/baselines/reference/submoduleAccepted/conformance/ts-expect-error-nocheck-js.errors.txt.diff: Language not supported
Comments suppressed due to low confidence (1)
internal/checker/utilities.go:1783
- Ensure that replacing tspath.IsDeclarationFileName(sourceFile.FileName()) with sourceFile.IsDeclarationFile provides the same behavior in all scenarios. It is important that this change does not inadvertently affect the logic for identifying declaration files.
func SkipTypeChecking(sourceFile *ast.SourceFile, options *core.CompilerOptions) bool {
Andrew Branch (andrewbranch)
approved these changes
Apr 7, 2025
Anders Hejlsberg (ahejlsberg)
approved these changes
Apr 7, 2025
| } | ||
|
|
||
| func (p *Program) getBindDiagnosticsForFile(sourceFile *ast.SourceFile) []*ast.Diagnostic { | ||
| // TODO: restore this; tsgo's main depends on this function binding all files for timing. |
There was a problem hiding this comment.
When and why would we restore this? Seems odd for skipLibChecks to affect binding.
Member
Author
There was a problem hiding this comment.
We have one function that gets both bind and check diagnostics (getBindAndCheckDiagnosticsForFileNoCache), and it's silenced by this same function in Strada. Why? I have no idea, but that's how it was. It's just that they are split apart in Corsa for timing reasons at the moment.
Aman Karmani (tmm1)
added a commit
to tmm1/typescript-go
that referenced
this pull request
Apr 7, 2025
Jake Bailey (jakebailey)
added a commit
to jakebailey/TypeScript
that referenced
this pull request
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This mirrors
getBindAndCheckDiagnosticsForFileNoCache, which looks like:Notably I am not doing this in
getBindDiagnosticsForFilesince that isn't actually called by anyone excepttsgofor timing.This fixes the baseline checks that were commented out in #762.