-
Notifications
You must be signed in to change notification settings - Fork 722
Return empty diags for files with skipped checking #763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 {
} | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When and why would we restore this? Seems odd for skipLibChecks
to affect binding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
This mirrors
getBindAndCheckDiagnosticsForFileNoCache
, which looks like:Notably I am not doing this in
getBindDiagnosticsForFile
since that isn't actually called by anyone excepttsgo
for timing.This fixes the baseline checks that were commented out in #762.