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
Merged
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@
"updatePackageDependencies"
],
"env": {
"NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/5320a329751f981f4c994adcbbaf1831/razorlanguageserver-linux-arm64-7.0.0-preview.23455.5.zip,https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/ad506dfb1de131553eeb5dffdd83f44d/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23455.5.zip,https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/1fe6ed4de9370a8fff70df1133db7889/razorlanguageserver-linux-musl-x64-7.0.0-preview.23455.5.zip,https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/8f59b89a029f07d4e5c20b9c2af4ca21/razorlanguageserver-linux-x64-7.0.0-preview.23455.5.zip,https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/350f666a3a714c2c77d0e79e92238ad7/razorlanguageserver-osx-arm64-7.0.0-preview.23455.5.zip,https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/0b9c653ee9c2815280877865013ab2e4/razorlanguageserver-osx-x64-7.0.0-preview.23455.5.zip,https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/f9ab8a6e654818635e0cd9e3115b59fc/razorlanguageserver-win-arm64-7.0.0-preview.23455.5.zip,https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/43a6adc38859d6cf4d524239b9c3ccf9/razorlanguageserver-win-x64-7.0.0-preview.23455.5.zip,https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/b3a60e667dc67edd38d2a7dd1d6ee139/razorlanguageserver-win-x86-7.0.0-preview.23455.5.zip",
"NEW_DEPS_VERSION": "7.0.0-preview.23455.5",
"NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/af4c33cdb53e85a7de39fb07195e05b2/razorlanguageserver-linux-arm64-7.0.0-preview.23456.2.zip,https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/24783517c9a4729efbd7dfd2a97fe5cc/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23456.2.zip,https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/e5e12ac99072e02499bef77c2c5034a2/razorlanguageserver-linux-musl-x64-7.0.0-preview.23456.2.zip,https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/86a165500517ca828227bfd0f28f7a02/razorlanguageserver-linux-x64-7.0.0-preview.23456.2.zip,https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/d61e51f223e6bfeceae821b1cce36bfc/razorlanguageserver-osx-arm64-7.0.0-preview.23456.2.zip,https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/b9ee27ddd84b0f4faf82e88589c8584f/razorlanguageserver-osx-x64-7.0.0-preview.23456.2.zip,https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/d279c139e3d914fec96dfab50f05f438/razorlanguageserver-win-arm64-7.0.0-preview.23456.2.zip,https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/258d3df59cb903ca4bcb9d42b854e28b/razorlanguageserver-win-x64-7.0.0-preview.23456.2.zip,https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/d2ffb8978958712807d88ebf38914f47/razorlanguageserver-win-x86-7.0.0-preview.23456.2.zip",
"NEW_DEPS_VERSION": "7.0.0-preview.23456.2",
"NEW_DEPS_ID": "Razor"
},
"cwd": "${workspaceFolder}"
Expand Down
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"defaults": {
"roslyn": "4.8.0-3.23455.11",
"omniSharp": "1.39.7",
"razor": "7.0.0-preview.23455.5",
"razor": "7.0.0-preview.23456.2",
maryamariyan marked this conversation as resolved.
Show resolved Hide resolved
"razorOmnisharp": "7.0.0-preview.23363.1"
},
"main": "./dist/extension",
Expand Down Expand Up @@ -613,46 +613,46 @@
{
"id": "Razor",
"description": "Razor Language Server (Windows / x64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/43a6adc38859d6cf4d524239b9c3ccf9/razorlanguageserver-win-x64-7.0.0-preview.23455.5.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/258d3df59cb903ca4bcb9d42b854e28b/razorlanguageserver-win-x64-7.0.0-preview.23456.2.zip",
"installPath": ".razor",
"platforms": [
"win32"
],
"architectures": [
"x86_64"
],
"integrity": "01AC16CE66A293E8AEDE43947B41C46A24A35DCD5B23CBB966CA3FFB37894DC0"
"integrity": "2776B6967DE613C03B2EFEA9490D8B82BDF23E435FE7C6167D6A3ED58EC706ED"
},
{
"id": "Razor",
"description": "Razor Language Server (Windows / x86)",
"url": "https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/b3a60e667dc67edd38d2a7dd1d6ee139/razorlanguageserver-win-x86-7.0.0-preview.23455.5.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/d2ffb8978958712807d88ebf38914f47/razorlanguageserver-win-x86-7.0.0-preview.23456.2.zip",
"installPath": ".razor",
"platforms": [
"win32"
],
"architectures": [
"x86"
],
"integrity": "059FA2081952AAD7CD1E6407B2D47D9AAEEA0F17EA35380ED5B3B26FDD0ED52F"
"integrity": "E2040016EF17B2D181BFD5FD8D03FC2959AF8E909ADD17FABFC87370BBA42802"
},
{
"id": "Razor",
"description": "Razor Language Server (Windows / ARM64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/f9ab8a6e654818635e0cd9e3115b59fc/razorlanguageserver-win-arm64-7.0.0-preview.23455.5.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/d279c139e3d914fec96dfab50f05f438/razorlanguageserver-win-arm64-7.0.0-preview.23456.2.zip",
"installPath": ".razor",
"platforms": [
"win32"
],
"architectures": [
"arm64"
],
"integrity": "80F748457356E766685B17195CE70430938D55783AC976E5BC78395EE2B20622"
"integrity": "FA3FD214F14C61D9E810F36060C09ED7E245697B34371EC705D275BF825E76C4"
},
{
"id": "Razor",
"description": "Razor Language Server (Linux / x64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/8f59b89a029f07d4e5c20b9c2af4ca21/razorlanguageserver-linux-x64-7.0.0-preview.23455.5.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/86a165500517ca828227bfd0f28f7a02/razorlanguageserver-linux-x64-7.0.0-preview.23456.2.zip",
"installPath": ".razor",
"platforms": [
"linux"
Expand All @@ -663,12 +663,12 @@
"binaries": [
"./rzls"
],
"integrity": "D3D7BAB056AADD815E9B2D6F85BEF8CF0BEA1D5F662E6E7D07CA484C1AF25934"
"integrity": "1B5F1A6A74FA0ADA04B7061C243FA4CA72591A1973B992A4C25E94A0137FD3DF"
},
{
"id": "Razor",
"description": "Razor Language Server (Linux ARM64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/5320a329751f981f4c994adcbbaf1831/razorlanguageserver-linux-arm64-7.0.0-preview.23455.5.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/af4c33cdb53e85a7de39fb07195e05b2/razorlanguageserver-linux-arm64-7.0.0-preview.23456.2.zip",
"installPath": ".razor",
"platforms": [
"linux"
Expand All @@ -679,12 +679,12 @@
"binaries": [
"./rzls"
],
"integrity": "8C520CB788B3D31A519EF98E64BFEF80DC0142438DB91927588B03969A19805C"
"integrity": "37EC155920952719CD76F7E8BFD65EA3D0A2738A675670B5614D23D9542D5DE8"
},
{
"id": "Razor",
"description": "Razor Language Server (Linux musl / x64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/1fe6ed4de9370a8fff70df1133db7889/razorlanguageserver-linux-musl-x64-7.0.0-preview.23455.5.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/e5e12ac99072e02499bef77c2c5034a2/razorlanguageserver-linux-musl-x64-7.0.0-preview.23456.2.zip",
"installPath": ".razor",
"platforms": [
"linux-musl"
Expand All @@ -695,12 +695,12 @@
"binaries": [
"./rzls"
],
"integrity": "A8F2D1297BB16226394777BCB6149ED46E08339F639DB46395AFA9109CA59740"
"integrity": "F4399BCEE6192BF3DBA1A6E93DE801075DF1433DF772143B7612FBD60B078361"
},
{
"id": "Razor",
"description": "Razor Language Server (Linux musl ARM64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/ad506dfb1de131553eeb5dffdd83f44d/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23455.5.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/24783517c9a4729efbd7dfd2a97fe5cc/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23456.2.zip",
"installPath": ".razor",
"platforms": [
"linux-musl"
Expand All @@ -711,12 +711,12 @@
"binaries": [
"./rzls"
],
"integrity": "4A3A1D3239B0005E3185212E3A77CAAFD52B540C71C9D82FB8EB9998F1ADC29B"
"integrity": "E471B4F4FB70BB22EB689A759BCAD22B12908EC7446BB98EA69EED974E28E9C7"
},
{
"id": "Razor",
"description": "Razor Language Server (macOS / x64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/0b9c653ee9c2815280877865013ab2e4/razorlanguageserver-osx-x64-7.0.0-preview.23455.5.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/b9ee27ddd84b0f4faf82e88589c8584f/razorlanguageserver-osx-x64-7.0.0-preview.23456.2.zip",
"installPath": ".razor",
"platforms": [
"darwin"
Expand All @@ -727,12 +727,12 @@
"binaries": [
"./rzls"
],
"integrity": "D3259D7AFDD5C5B0D25BEBB9E6C00EF8F5ACF0932E902E58CDD9FA10E3BB5EE9"
"integrity": "B0C40624FE418E3C47DCDC44DDF0643C7F980A254FEEEB49BAED21A010102EB8"
},
{
"id": "Razor",
"description": "Razor Language Server (macOS ARM64)",
"url": "https://download.visualstudio.microsoft.com/download/pr/1f4eb4b9-e8b7-494b-81eb-29e9ffff39de/350f666a3a714c2c77d0e79e92238ad7/razorlanguageserver-osx-arm64-7.0.0-preview.23455.5.zip",
"url": "https://download.visualstudio.microsoft.com/download/pr/e5617c98-d08e-43f2-a9bf-a36fec5306b7/d61e51f223e6bfeceae821b1cce36bfc/razorlanguageserver-osx-arm64-7.0.0-preview.23456.2.zip",
"installPath": ".razor",
"platforms": [
"darwin"
Expand All @@ -743,7 +743,7 @@
"binaries": [
"./rzls"
],
"integrity": "9B28F0F60F2365A25505D6A9C40104A6CEB07D9AD5322609313177C001639C36"
"integrity": "C0C325C057E9392845E19F1918F9DEA56500A4188FC619B5529B2785EB2A1D65"
},
{
"id": "RazorOmnisharp",
Expand Down
4 changes: 1 addition & 3 deletions src/razor/src/semantic/provideSemanticTokensResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { SemanticTokensResponse } from './semanticTokensResponse';

export class ProvideSemanticTokensResponse {
// tslint:disable-next-line: variable-name
constructor(public Result: SemanticTokensResponse, public HostDocumentSyncVersion: number | null) {}
constructor(public Tokens: Array<Array<number>>, public HostDocumentSyncVersion: number) {}
}
5 changes: 2 additions & 3 deletions src/razor/src/semantic/semanticTokensRangeHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import * as vscode from 'vscode';
import { RequestType } from 'vscode-languageclient';
import { RazorLanguageServerClient } from '../razorLanguageServerClient';
import { ProvideSemanticTokensResponse } from './provideSemanticTokensResponse';
import { SemanticTokensResponse } from './semanticTokensResponse';
import { SerializableSemanticTokensParams } from './serializableSemanticTokensParams';

export class SemanticTokensRangeHandler {
Expand All @@ -18,8 +17,8 @@ export class SemanticTokensRangeHandler {
any
> = new RequestType(SemanticTokensRangeHandler.getSemanticTokensRangeEndpoint);
private emptySemanticTokensResponse: ProvideSemanticTokensResponse = new ProvideSemanticTokensResponse(
new SemanticTokensResponse(new Array<number>(), ''),
null
new Array<Array<number>>(),
-1
);

constructor(private readonly serverClient: RazorLanguageServerClient) {}
Expand Down
8 changes: 0 additions & 8 deletions src/razor/src/semantic/semanticTokensResponse.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import { SerializableTextDocumentIdentifier } from '../rpc/serializableTextDocum

export interface SerializableSemanticTokensParams {
textDocument: SerializableTextDocumentIdentifier;
range: SerializableRange;
ranges: SerializableRange[];
}