Skip to content
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

Add tsx/jsx as recognized extensions for TS #73852

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Conversation

dibarbet
Copy link
Member

@dibarbet dibarbet commented Jun 4, 2024

Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2078456

This issue precedes 17.10, however it is exacerbated there because we switched to pull diagnostics (for TS as well). A combination of bugs lead to the problem here

  1. The client is sending us incorrect language ids. They send us the content type display name, which has almost no relation to the language ids that are defined by the LSP spec - https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentItem
  2. We were missing the fallback when no languageId is specified for .tsx and .jsx (and others)
  3. The work to support different language handlers made all of this worse (as we now care upfront what the language is).

This change resolves 2). I'm talking to the client about 1 (but we should fallback correctly for the no id case regardless).

  1. will be improved once we switch Razor/XAML to our LSP types and can do upfront deserialization.

Tagging @MariaSolOs

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 4, 2024
@MariaSolOs
Copy link
Contributor

I think we're missing some file extensions here. I just shared those with you offline.

@dibarbet dibarbet changed the base branch from release/dev17.10 to main June 5, 2024 18:07
@dibarbet
Copy link
Member Author

dibarbet commented Jun 5, 2024

I think we're missing some file extensions here. I just shared those with you offline.

thanks, updated!

@dibarbet dibarbet marked this pull request as ready for review June 5, 2024 18:08
@dibarbet dibarbet requested a review from a team as a code owner June 5, 2024 18:08
@dibarbet dibarbet merged commit dc480df into dotnet:main Jun 6, 2024
25 checks passed
@dibarbet dibarbet deleted the fix_tsx_lsp branch June 6, 2024 20:13
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jun 6, 2024
dibarbet added a commit to dibarbet/roslyn that referenced this pull request Jun 11, 2024
Add tsx/jsx as recognized extensions for TS
dibarbet added a commit that referenced this pull request Jun 11, 2024
@jjonescz jjonescz modified the milestones: Next, 17.11 P3 Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants