Repository navigation
Clarify error when content mapper extension ends in a built-in extension - #64921
Open
GOVARDHAN CHINTA (govardhanchinta99) wants to merge 2 commits into
Open
GOVARDHAN CHINTA (govardhanchinta99) wants to merge 2 commits into
GOVARDHAN CHINTA (govardhanchinta99) wants to merge 2 commits into
Conversation
Author
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
I don't think the .json.gz files are supposed to be updated.
There was a problem hiding this comment.
Thanks for catching that. I removed all of the loc/*.json.gz changes in the latest commit, they are back to what main has. The PR now only touches the diagnostic message, the generated Go and JSON files for it, and the tsoptions code and tests.
The loc/*.json.gz files are produced by the localization pipeline and should not be updated in this PR. Restore them to the versions on main.
This branch has not been deployed
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 #64917
A content mapper extension is rejected when it ends in a built-in extension (HasReservedSourceExtension does a suffix check). For
.const.jsonthe error said it "is a built-in extension", which is misleading, because.const.jsonis not built-in, it is rejected because it ends in.json.This changes the message for TS18066 to:
"Content mapper file extension '{0}' cannot be registered because it ends in a built-in extension."The error code and the check itself are unchanged. I did not add support for.const.json-style extensions, since that looks like a design decision for the team.Changes:
npx hereby generate:diagnosticsTesting: the tsoptions package and the compiler test runner (internal/testrunner) pass, and
hereby check:formatis clean.cc Andrew Branch (@andrewbranch), you worked on content mappers, so I'd appreciate your view on whether this wording works.