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

Reflecting changes in vscode to take ranges in SerializableSemanticTokensParams #6304

Merged
merged 11 commits into from
Sep 11, 2023

Conversation

maryamariyan
Copy link
Member

@maryamariyan maryamariyan commented Sep 6, 2023

Reflecting changes in vscode-csharp after making ProvideSemanticTokensResponse take ranges as input.

  • Modify SerializableSemanticTokensParams to take ranges rather than range
  • Modify the data property of the SemanticTokensResponse class.
  • Changes data to take an array of arrays of number type

Related to dotnet/razor#9092

Local testing:

  • With feature flag disabled (default behavior for VS code), the ranges array contains one element as expected:
    image

  • With feature flag turned enabled, the ranges array contains sorted disjoined elements as expected:
    image

Observation

  • Realized that in vs code we are just using textmate, so the testing involved just assuring the values in ranges are properly mapped over, but the are not really used, in VS code we are just returning dummy empty responses for semantic range requests and just relying on text mate.

  • Once we complete issue Enable CSharp Semantic tokens in VSCode razor#4323 we'd then be matching behaviors between VS and VS code.

@maryamariyan maryamariyan changed the title Reflecting changes in vscode to take an array of semantic ranges Reflecting changes in vscode to take ranges in SerializableSemanticTokensParams Sep 6, 2023
@maryamariyan maryamariyan marked this pull request as ready for review September 8, 2023 00:20
@maryamariyan maryamariyan requested a review from a team as a code owner September 8, 2023 00:20
maryamariyan and others added 2 commits September 8, 2023 11:02
- Changes data to take an array of arrays of number type

Related to dotnet/razor#9092
@davidwengier davidwengier force-pushed the dev/maryamariyan/ranges-changes branch from 8c3053c to 6be8367 Compare September 8, 2023 01:34
@davidwengier davidwengier requested a review from a team as a code owner September 8, 2023 01:34
    - The property type/name was out of sync with razorc counterpart
- Parameter of the ProvideSemanticTokensResponse class constructor.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
package.json Show resolved Hide resolved
With magic number -5 Razor Language Server would
know that the response is coming from VS Code so it
would ignore discarding response due to out of sync
error altogether.
@maryamariyan
Copy link
Member Author

maryamariyan commented Sep 11, 2023

Noticing the Test OmniSharpt Test windows is failing on the CI but locally tests completed successfully for me:

Local output after running npm run test:

Test Suites: 1 passed, 1 total
Tests:       309 passed, 309 total
Snapshots:   309 passed, 309 total
Time:        14.113 s

I will rerun the CI to resolve the failures in the report, in case it happens to be intermittent.

…es-changes

Conflict resolved in CHANGELOG.md
@maryamariyan
Copy link
Member Author

maryamariyan commented Sep 11, 2023

Seems like VS Code is not yet providing support for coloring certain strings and is causing the lines below to show up in red.

  • This is not a regression. I tested this with 3 a week old vscode C# extension 2.0.376 and it still would reproduce with the colors below.

Based on this observation, I will be merging the pull request as it is.

image

@maryamariyan maryamariyan merged commit 34b3d19 into main Sep 11, 2023
8 checks passed
@maryamariyan maryamariyan deleted the dev/maryamariyan/ranges-changes branch September 12, 2023 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants