Error with a suggestion of '.' for empty project reference paths - #4653
Closed
Klyne Chrysler (KlyneChrysler) wants to merge 1 commit into
Closed
Error with a suggestion of '.' for empty project reference paths#4653Klyne Chrysler (KlyneChrysler) wants to merge 1 commit into
Klyne Chrysler (KlyneChrysler) wants to merge 1 commit into
Conversation
An empty reference path previously reported the generic TS18051 empty string message. Use a dedicated diagnostic that suggests '.' as discussed in #4484. Fixes #4484
Member
|
Thank you for contributing to the TypeScript native port! Development has moved from this repository back to the main microsoft/TypeScript repository. GitHub does not have PR transfer functionality, so we're closing this PR here. If this change is still relevant, please reopen it as a new pull request in See microsoft/typescript-go#4918 for more information about the move. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes microsoft/TypeScript#63848
An empty "path" in a project reference now reports a dedicated diagnostic, TS18052: A project reference path cannot be an empty string. Did you mean '.'? Previously it reported the generic TS18051 empty string message, added incidentally by #4494 for the non string panic in #4269, without the suggestion discussed in microsoft/TypeScript#63848.
Code 18052 is unused in this repo, in the pinned Strada submodule, and across testdata. The message lives in extraDiagnosticMessages.json since it intentionally diverges from Strada, and the new tsconfigParsing test case is marked noSubmoduleBaseline for the same reason.
Verified with go test on internal/tsoptions (209 passed) and the TestBuildConfigFileErrors tsbuild suite (6 passed), go vet clean, go build clean, hereby format clean. The only change to the existing tsbuild baseline is the empty path line switching from TS18051 to TS18052.
Disclosure per the contributing guidelines: this PR was authored with AI assistance, and I reviewed and verified the changes.