Skip to content

Commit ecd00c5

Browse files
authored
Merge pull request #6552 from dibarbet/merge_main
Snap main into release
2 parents 7a21023 + 23eb3bc commit ecd00c5

File tree

75 files changed

+1344
-933
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1344
-933
lines changed

.vscode/launch.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@
291291
"updatePackageDependencies"
292292
],
293293
"env": {
294-
"NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/f0e050f69a2afb6758a1bccfbf00bb9a/razorlanguageserver-linux-arm64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/e3d3993005c037451c715c26ec43328b/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/c3fd7144ecc6abea28e905504a60d65b/razorlanguageserver-linux-musl-x64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/98abba355a15ad90c59eb5653326baeb/razorlanguageserver-linux-x64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/68cd5916dbff0936c04ae0a152268d0f/razorlanguageserver-osx-arm64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/f13124670d3c1f52ecbeb79538d763cb/razorlanguageserver-osx-x64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/d50e57f6a69f75a65496f32b107532e8/razorlanguageserver-win-arm64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/70a917c8a17f4052a3a6b3862200f9f5/razorlanguageserver-win-x64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/ee48f10fa72517ce132fad30d458680a/razorlanguageserver-win-x86-7.0.0-preview.23475.5.zip",
295-
"NEW_DEPS_VERSION": "7.0.0-preview.23475.5",
294+
"NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/bb7cd0c44e45bd21cd1341a4a6e87f1c/razorlanguageserver-linux-arm64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/159a171a7cc1ceb96604d148d5c75574/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/fb08013aad8cfbb2bc2c3f5f4d276a0d/razorlanguageserver-linux-musl-x64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/5ece63dde175c03ce79a8ec91005537b/razorlanguageserver-linux-x64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/89a58de8daaea554d00105dc435dfc98/razorlanguageserver-osx-arm64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/8a13539f57d6e59b32e767d3684c6c84/razorlanguageserver-osx-x64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/efe8ebdcd7f4162a537acb9325234f02/razorlanguageserver-win-arm64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/e0d9dc729905a672edb6bb44239fceb0/razorlanguageserver-win-x64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/c7f08527fbb3809f6dc8e4bf2dc81571/razorlanguageserver-win-x86-7.0.0-preview.23513.5.zip",
295+
"NEW_DEPS_VERSION": "7.0.0-preview.23513.5",
296296
"NEW_DEPS_ID": "Razor"
297297
},
298298
"cwd": "${workspaceFolder}"
@@ -323,6 +323,17 @@
323323
"generateOptionsSchema"
324324
],
325325
"cwd": "${workspaceFolder}"
326+
},
327+
{
328+
"type": "node",
329+
"request": "launch",
330+
"name": "Razor integration tests",
331+
"preLaunchTask": "build",
332+
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
333+
"args": [
334+
"test:razorintegration"
335+
],
336+
"cwd": "${workspaceFolder}"
326337
}
327338
]
328339
}

CHANGELOG.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
## Known Issues
22

33
- Diagnostics related feature requests and improvements [#5951](https://github.com/dotnet/vscode-csharp/issues/5951)
4-
- [O# Parity] FixAll support for code fixes and refactorings [#5735](https://github.com/dotnet/vscode-csharp/issues/5735)
4+
- [O# Parity] Nested code code action support for code fixes and refactorings [#5735](https://github.com/dotnet/vscode-csharp/issues/5735)
55
- [O# Parity] Nuget restore [#5725](https://github.com/dotnet/vscode-csharp/issues/5725)
6-
- [O# Parity] Projects running on Mono may not load correctly [#5721](https://github.com/dotnet/vscode-csharp/issues/5721)
7-
- [O# Parity] Run and debug tests in context [#5719](https://github.com/dotnet/vscode-csharp/issues/5719)
86
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
97

108
## Latest
9+
* Update Razor to 7.0.0-preview.23513.5 (PR: [#6551](https://github.com/dotnet/vscode-csharp/pull/6551))
10+
* Reduce noisy errors when viewing git diff (PR: [razor#9407](https://github.com/dotnet/razor/pull/9407))
11+
* Update Roslyn to 4.9.0-1.23513.7 (PR: [#6548](https://github.com/dotnet/vscode-csharp/pull/6548))
12+
* Fix extraneous error when connecting to devkit (PR: [#70298](https://github.com/dotnet/roslyn/pull/70298))
13+
* Add support for using Mono to load .NET Framework projects (PR: [#70263](https://github.com/dotnet/roslyn/pull/70263))
14+
* Fix analyzer references (PR: [#70331](https://github.com/dotnet/roslyn/pull/70331))
15+
* Hide debug console when using `"console": "integratedTerminal"` (PR: [#6523](https://github.com/dotnet/vscode-csharp/pull/6523))
16+
* Fix dotnet path resolution when using snap installed packages (PR: [#6515](https://github.com/dotnet/vscode-csharp/pull/6515))
17+
* Track debugging sessions until csdevkit is initialized (PR: [#6480](https://github.com/dotnet/vscode-csharp/pull/6480))
18+
* Update vsdbg and vsdbg-ui to 2.0.4 (PR: [#6517](https://github.com/dotnet/vscode-csharp/pull/6517))
19+
* Add setting to control Razor component commit behaviour (PR: [#6506](https://github.com/dotnet/vscode-csharp/pull/6506))
20+
* Razor textmate colorization fixes (PR: [#6514](https://github.com/dotnet/vscode-csharp/pull/6514))
21+
22+
## 2.6.24
23+
* Update Razor version to 7.0.0-preview.23475.5 (PR: [#6506](https://github.com/dotnet/vscode-csharp/pull/6506))
24+
* Add setting for whether to complete components with space (PR: [razor#9379](https://github.com/dotnet/razor/pull/9379))
1125
* Update Roslyn version to 4.9.0-1.23506.7 (PR: [#6447](https://github.com/dotnet/vscode-csharp/pull/6447))
1226
* Fix various issues with project loading and allow fallbacks to .NET framework msbuild (PR: [#70240](https://github.com/dotnet/roslyn/pull/70240))
1327
* Fix some Razor colorization issues (PR: [#6502](https://github.com/dotnet/vscode-csharp/pull/6502))
@@ -30,6 +44,7 @@
3044
* Update Razor project configuration file name (PR: [#70156](https://github.com/dotnet/roslyn/pull/70156))* added support.md file (PR: [#6478](https://github.com/dotnet/vscode-csharp/pull/6478))
3145
* Debugger: Improve the display of various debug configurations and snippets (PR: [#6456](https://github.com/dotnet/vscode-csharp/pull/6456))
3246
* Initialize Razor even if Razor doc isn't opened yet (PR: [#6473](https://github.com/dotnet/vscode-csharp/pull/6473))
47+
* Debugger: better handle long strings ([#6496](https://github.com/dotnet/vscode-csharp/issues/6496)). Strings are truncated if they are longer than 1024 UTF-16 characters, but the full value up to 5,242,880 characters or 10 megabytes, is available using 'Copy Value' in the watch or variables window. Truncated strings will end with '...'.
3348

3449
## 2.5.30
3550
* Add code action fix all support (PR: [#6310](https://github.com/dotnet/vscode-csharp/pull/6310))

azure-pipelines-official.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,16 @@ trigger:
55
- release
66
pr: none
77

8-
variables:
9-
${{ if eq(variables['Build.SourceBranchName'], 'release') }}:
10-
prereleaseFlag: ''
11-
${{ else }}:
12-
prereleaseFlag: '--prerelease'
8+
parameters:
9+
# Allows the version number to be set manually for a specific build.
10+
# Useful when we need to create an updated extension version with no changes (for example to fix a bad partial release).
11+
- name: versionNumberOverride
12+
type: string
13+
default: 'default'
1314

1415
stages:
15-
- stage: Build
16-
dependsOn: []
17-
jobs:
18-
- job: Build
19-
steps:
20-
- template: azure-pipelines/build.yml
21-
parameters:
22-
prereleaseFlag: $(prereleaseFlag)
23-
pool:
24-
name: NetCore1ESPool-Internal
25-
demands: ImageOverride -equals Build.Ubuntu.2204.Amd64
16+
- template: azure-pipelines/build.yml
17+
parameters:
18+
versionNumberOverride: ${{ parameters.versionNumberOverride }}
2619

2720
# TODO: add compliance, signing.

azure-pipelines.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,8 @@ pr:
1111
- release
1212
- main
1313

14-
variables:
15-
${{ if eq(variables['Build.SourceBranchName'], 'release') }}:
16-
prereleaseFlag: ''
17-
${{ else }}:
18-
prereleaseFlag: '--prerelease'
19-
2014
stages:
21-
- stage: Build
22-
dependsOn: []
23-
jobs:
24-
- job: Build
25-
steps:
26-
- template: azure-pipelines/build.yml
27-
parameters:
28-
prereleaseFlag: $(prereleaseFlag)
29-
pool:
30-
name: NetCore-Public
31-
demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
15+
- template: azure-pipelines/build.yml
3216

3317
- stage: Test
3418
displayName: Test

azure-pipelines/build.yml

Lines changed: 56 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,63 @@
11
parameters:
2-
- name: prereleaseFlag
2+
- name: versionNumberOverride
33
type: string
4+
default: 'default'
45

5-
steps:
6-
- checkout: self
7-
clean: true
8-
submodules: true
9-
fetchTags: false
10-
fetchDepth: 0
6+
stages:
7+
- stage: Build
8+
displayName: 'Build VSIXs'
9+
jobs:
10+
- job:
11+
displayName: 'Build Prerelease VSIXs'
12+
steps:
13+
- checkout: self
14+
clean: true
15+
submodules: true
16+
fetchTags: false
17+
fetchDepth: 0
1118

12-
- template: prereqs.yml
19+
- template: prereqs.yml
20+
parameters:
21+
versionNumberOverride: ${{ parameters.versionNumberOverride }}
1322

14-
- script: gulp 'vsix:release:package' ${{ parameters.prereleaseFlag }}
15-
displayName: 'Build VSIXs'
23+
- script: gulp 'vsix:release:package' --prerelease
24+
displayName: 'Build VSIXs'
25+
26+
- task: PublishPipelineArtifact@1
27+
# Run the publish step so we have vsix's even if the tests fail.
28+
condition: succeededOrFailed()
29+
displayName: 'Publish VSIXs'
30+
inputs:
31+
targetPath: '$(Build.SourcesDirectory)/vsix'
32+
artifactName: 'VSIX_Prerelease_$(System.JobAttempt)'
33+
34+
- script: npm run omnisharptest:artifacts
35+
displayName: 'Run artifacts tests'
36+
37+
- job:
38+
displayName: 'Build Release VSIXs'
39+
steps:
40+
- checkout: self
41+
clean: true
42+
submodules: true
43+
fetchTags: false
44+
fetchDepth: 0
45+
46+
- template: prereqs.yml
47+
parameters:
48+
versionNumberOverride: ${{ parameters.versionNumberOverride }}
49+
50+
- script: gulp 'vsix:release:package'
51+
displayName: 'Build VSIXs'
1652

17-
- task: PublishPipelineArtifact@1
18-
# Run the publish step so we have vsix's even if the tests fail.
19-
condition: succeededOrFailed()
20-
displayName: 'Publish VSIXs'
21-
inputs:
22-
targetPath: '$(Build.SourcesDirectory)/vsix'
23-
artifactName: 'VSIXs - Attempt $(System.JobAttempt)'
53+
- task: PublishPipelineArtifact@1
54+
# Run the publish step so we have vsix's even if the tests fail.
55+
condition: succeededOrFailed()
56+
displayName: 'Publish VSIXs'
57+
inputs:
58+
targetPath: '$(Build.SourcesDirectory)/vsix'
59+
artifactName: 'VSIX_Release_$(System.JobAttempt)'
2460

25-
- script: npm run omnisharptest:artifacts
26-
displayName: 'Run artifacts tests'
61+
- script: npm run omnisharptest:artifacts
62+
displayName: 'Run artifacts tests'
63+

azure-pipelines/prereqs.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
parameters:
2+
- name: versionNumberOverride
3+
type: string
4+
default: 'default'
5+
16
steps:
27

38
# The server package is downloaded from NuGet
@@ -13,19 +18,24 @@ steps:
1318
inputs:
1419
version: '7.x'
1520

16-
# Set the CI build number to the VSIX version we're creating from this build.
1721
- script: |
1822
dotnet tool install --tool-path $(Agent.BuildDirectory) nbgv
19-
$(Agent.BuildDirectory)/nbgv cloud
2023
displayName: Install nbgv
2124

25+
# If we want to override the version, update the version.json here - vsix packaging will see this value
26+
# and use it to set the version number in the package.json.
27+
- ${{ if ne(parameters.versionNumberOverride, 'default') }}:
28+
- script: $(Agent.BuildDirectory)/nbgv set-version ${{ parameters.versionNumberOverride }}
29+
displayName: 'Override version number'
30+
31+
# Set the CI build number to the VSIX version we're creating from this build.
32+
- script: $(Agent.BuildDirectory)/nbgv cloud
33+
displayName: Set pipeline build number
34+
2235
- script: |
2336
npm ci
2437
npm i -g gulp
2538
displayName: 'Install dependencies'
2639

2740
- script: npm run compile
2841
displayName: 'Compile'
29-
30-
- script: npm run vscode:prepublish
31-
displayName: 'Prepublish VSIXs'

azure-pipelines/release.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ parameters:
1111
- name: test
1212
type: boolean
1313
default: true
14+
- name: uploadPrerelease
15+
type: boolean
16+
default: true
1417

1518
variables:
1619
# This is expected to provide VisualStudioMarketplacePAT to the release (https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token)
@@ -44,8 +47,15 @@ stages:
4447
npm install --global vsce
4548
displayName: 'Install vsce'
4649
- pwsh: |
50+
$artifactFolderPrefix = "VSIX_Release_"
51+
if ("${{ parameters.uploadPrerelease }}" -eq "true") {
52+
$artifactFolderPrefix = "VSIX_Prerelease_"
53+
}
54+
55+
Write-Host "Using artifacts from $artifactFolderPrefix"
56+
4757
# Our build pipeline would generated build based on attempt number. Publishing the latest attempt.
48-
$allArtifacts = Get-ChildItem -Path "VSIXs - Attempt*" | Sort-Object -Descending
58+
$allArtifacts = Get-ChildItem -Path "$artifactFolderPrefix*" | Sort-Object -Descending
4959
if ($allArtifacts.Length -eq 0) {
5060
throw "No Artifacts is downloaded."
5161
}
@@ -54,14 +64,11 @@ stages:
5464
Write-Host "All artifacts: $($allArtifacts). Publishing $($publishArtifacts)."
5565
5666
$basePublishArgs = , "publish"
57-
# Artifacts are published to either pre-release or release based on the build branch, https://code.visualstudio.com/api/working-with-extensions/publishing-extension#prerelease-extensions
58-
If ("$(resources.pipeline.officialBuildCI.sourceBranch)" -eq "refs/heads/main") {
67+
If ("${{ parameters.uploadPrerelease }}" -eq "true") {
5968
$basePublishArgs += "--pre-release"
6069
Write-Host "Publish to pre-release channel."
61-
} ElseIf ("$(resources.pipeline.officialBuildCI.sourceBranch)" -eq "refs/heads/release") {
62-
Write-Host "Publish to release channel."
6370
} Else {
64-
throw "Unexpected branch name: $(resources.pipeline.officialBuildCI.sourceBranch)."
71+
Write-Host "Publish to release channel."
6572
}
6673
$basePublishArgs += '--packagePath'
6774

azure-pipelines/test-prereqs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
steps:
22

3+
- script: npm run vscode:prepublish
4+
displayName: 'Prepublish VSIXs'
5+
36
# We need to download the roslyn language server for the current platform to run integration tests against it.
47
- script: gulp installDependencies
58
displayName: 'Install Roslyn Language Server'

jest.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ const config: Config = {
88
projects: [
99
'<rootDir>/test/unitTests/jest.config.ts',
1010
'<rootDir>/test/integrationTests/jest.config.ts',
11+
'<rootDir>/test/razorIntegrationTests/jest.config.ts',
1112
'<rootDir>/test/razorTests/jest.config.ts',
12-
'<rootDir>/omnisharptest/omnisharpJestTests/jest.config.ts',
13+
'<rootDir>/omnisharptest/omnisharpUnitTests/jest.config.ts',
1314
],
1415
};
1516

omnisharptest/omnisharpUnitTests/absolutePath.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { expect } from 'chai';
6+
import { describe, test, expect, beforeEach, afterEach } from '@jest/globals';
77
import { AbsolutePath } from '../../src/packageManager/absolutePath';
88
import { TmpAsset, CreateTmpFile } from '../../src/createTmpAsset';
99
import { join } from 'path';
1010

11-
suite(AbsolutePath.name, () => {
11+
describe(AbsolutePath.name, () => {
1212
let tmpPath: TmpAsset;
1313

14-
setup(async () => {
14+
beforeEach(async () => {
1515
tmpPath = await CreateTmpFile();
1616
});
1717

18-
teardown(() => {
18+
afterEach(() => {
1919
tmpPath.dispose();
2020
});
2121

2222
test('Throws error when the passed value is not an absolute path', () => {
23-
expect(() => new AbsolutePath('somePath')).to.throw(Error);
23+
expect(() => new AbsolutePath('somePath')).toThrow(Error);
2424
});
2525

2626
test(`${AbsolutePath.getAbsolutePath.name}: Returns an absolute path based by resolving the path with the value to prepend`, () => {
2727
const absolutePath = AbsolutePath.getAbsolutePath(tmpPath.name, 'somePath');
28-
expect(absolutePath.value).to.be.equal(join(tmpPath.name, 'somePath'));
28+
expect(absolutePath.value).toEqual(join(tmpPath.name, 'somePath'));
2929
});
3030
});

0 commit comments

Comments
 (0)