Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into jesting
Browse files Browse the repository at this point in the history
  • Loading branch information
dibarbet committed Aug 19, 2023
2 parents 70b7a37 + 675d74e commit f4b9617
Show file tree
Hide file tree
Showing 230 changed files with 992 additions and 795 deletions.
82 changes: 41 additions & 41 deletions .vscode/launch.json

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)

## Latest
* Update Roslyn (PR: [#6131](https://github.com/dotnet/vscode-csharp/pull/6131))
* Only show toast for project load failures (PR: [#69494](https://github.com/dotnet/roslyn/pull/69494))
* Fix enter inserting /// on the incorrect line in documentation comments (PR: [#6130](https://github.com/dotnet/vscode-csharp/pull/6130))
* Build extension with node 18 LTS (PR: [#6128](https://github.com/dotnet/vscode-csharp/pull/6128))
* Update localized strings (PR: [#6129](https://github.com/dotnet/vscode-csharp/pull/6129))
* Fix paths for package.nls.*.json (PR: [#6121](https://github.com/dotnet/vscode-csharp/pull/6121))
* Add request to prepare for build diagnostic de-dupping (PR: [#6113](https://github.com/dotnet/vscode-csharp/pull/6113))
* Support unit test debugging options in Roslyn LSP (PR: [#6110](https://github.com/dotnet/vscode-csharp/pull/6110))
* Fix loading of package.nls.*.json (PR: [#6118](https://github.com/dotnet/vscode-csharp/pull/6118))
* Add localization infrastructure to debugger package.json strings (PR: [#6088](https://github.com/dotnet/vscode-csharp/pull/6088))
* Adjust C# semantic token scopes to better match 1.26 (PR: [#6094](https://github.com/dotnet/vscode-csharp/pull/6094))
* Update Razor to 7.0.0-preview.23410.1 (PR: [#6105](https://github.com/dotnet/vscode-csharp/pull/6105))
* Implement razor support for method simplification (PR: [#5982](https://github.com/dotnet/vscode-csharp/pull/5982))
* Attempt to find a valid dotnet version from PATH before using runtime installer extension (PR: [#6074](https://github.com/dotnet/vscode-csharp/pull/6074))
* Respect background analysis scope option in O# (PR: [#6058](https://github.com/dotnet/vscode-csharp/pull/6058))
* Add localization infrastructure to debugger components (PR: [#6064](https://github.com/dotnet/vscode-csharp/pull/6064))
* Add coreclr as a search keyword (PR: [#6071](https://github.com/dotnet/vscode-csharp/pull/6071))

## 2.0.357
* Fix issue with Go to Definition giving a "unable to resolve reference" error (PR: [#69453](https://github.com/dotnet/roslyn/pull/69453))
* Fix completion items not correctly adding using statements to the top of the file (PR: [#69454](https://github.com/dotnet/roslyn/pull/69454))
* Improve de-duping of project load failure toasts (PR: [#69455](https://github.com/dotnet/roslyn/pull/69455))
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

First install:

* Node.js ([v18.17.0 LTS](https://nodejs.org/de/blog/release/v18.17.0) is recommended).
* Node.js ([v18.17.0 LTS](https://nodejs.org/en/blog/release/v18.17.0) is recommended).
* Npm (The version shipped with node is fine)
* .NET 7.0 SDK (dotnet should be on your path)

Expand Down
2 changes: 1 addition & 1 deletion __mocks__/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { getFakeVsCode } from '../test/unitTests/testAssets/fakes';
import * as vscodeAdapter from '../src/vscodeAdapter';
import { getFakeVsCode } from '../test/unitTests/fakes';

// This module creates a manual mock for the vscode module for running in unit tests.
// Jest will automatically pick this up as it is in the __mocks__ directory next to node_modules.
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ steps:
targetPath: '$(Build.SourcesDirectory)/vsix'
artifactName: 'VSIXs - Attempt $(System.JobAttempt)'

- script: npm run test:artifacts
- script: npm run omnisharptest:artifacts
displayName: 'Run artifacts tests'
161 changes: 99 additions & 62 deletions azure-pipelines/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,72 +15,109 @@ parameters:
variables:
# This is expected to provide VisualStudioMarketplacePAT to the release (https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token)
- group: vscode-csharp release secrets
# This is expected to provide pat to tag release.
- group: DncEng-Partners-Tokens

jobs:
- deployment: PublishToMarketplace
displayName: PublishToMarketplace
environment: vscode-csharp-release-approvals
pool:
vmImage: ubuntu-latest
strategy:
runOnce:
deploy:
steps:
- download: 'none'
- task: DownloadPipelineArtifact@2
displayName: '📦 Download artifacts from build pipeline.'
inputs:
buildType: 'specific'
project: 'internal'
definition: 1264
buildVersionToDownload: 'specific'
buildId: '$(resources.pipeline.officialBuildCI.runID)'
branchName: '$(resources.pipeline.officialBuildCI.sourceBranch)'
- pwsh: |
npm install --global vsce
displayName: 'Install vsce'
- pwsh: |
# Our build pipeline would generated build based on attempt number. Publishing the latest attempt.
$allArtifacts = Get-ChildItem -Path "VSIXs - Attempt*" | Sort-Object -Descending
if ($allArtifacts.Length -eq 0) {
throw "No Artifacts is downloaded."
}
stages:
- stage: PublishStage
jobs:
- deployment: PublishToMarketplace
displayName: PublishToMarketplace
environment: vscode-csharp-release-approvals
pool:
vmImage: ubuntu-latest
strategy:
runOnce:
deploy:
steps:
- download: 'none'
- task: DownloadPipelineArtifact@2
displayName: '📦 Download artifacts from build pipeline.'
inputs:
buildType: 'specific'
project: 'internal'
definition: 1264
buildVersionToDownload: 'specific'
buildId: '$(resources.pipeline.officialBuildCI.runID)'
branchName: '$(resources.pipeline.officialBuildCI.sourceBranch)'
- pwsh: |
npm install --global vsce
displayName: 'Install vsce'
- pwsh: |
# Our build pipeline would generated build based on attempt number. Publishing the latest attempt.
$allArtifacts = Get-ChildItem -Path "VSIXs - Attempt*" | Sort-Object -Descending
if ($allArtifacts.Length -eq 0) {
throw "No Artifacts is downloaded."
}
$publishArtifacts = $allArtifacts[0]
Write-Host "All artifacts: $($allArtifacts). Publishing $($publishArtifacts)."
$publishArtifacts = $allArtifacts[0]
Write-Host "All artifacts: $($allArtifacts). Publishing $($publishArtifacts)."
$additionalPublishArgs = , "publish"
# 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
If ("$(resources.pipeline.officialBuildCI.sourceBranch)" -eq "refs/heads/main") {
$additionalPublishArgs += "--pre-release"
Write-Host "Publish to pre-release channel."
} ElseIf ("$(resources.pipeline.officialBuildCI.sourceBranch)" -eq "refs/heads/release") {
Write-Host "Publish to release channel."
} Else {
throw "Unexpected branch name: $(resources.pipeline.officialBuildCI.sourceBranch)."
}
$additionalPublishArgs += '--packagePath'
$additionalPublishArgs = , "publish"
# 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
If ("$(resources.pipeline.officialBuildCI.sourceBranch)" -eq "refs/heads/main") {
$additionalPublishArgs += "--pre-release"
Write-Host "Publish to pre-release channel."
} ElseIf ("$(resources.pipeline.officialBuildCI.sourceBranch)" -eq "refs/heads/release") {
Write-Host "Publish to release channel."
} Else {
throw "Unexpected branch name: $(resources.pipeline.officialBuildCI.sourceBranch)."
}
$additionalPublishArgs += '--packagePath'
$platforms = "arm64", "x64", "ia32"
$allVsixs = Get-ChildItem $publishArtifacts *.vsix
foreach ($vsix in $allVsixs) {
foreach ($plat in $platforms) {
if ($vsix.Name.Contains($plat)) {
$additionalPublishArgs += $vsix
$platforms = "arm64", "x64", "ia32"
$allVsixs = Get-ChildItem $publishArtifacts *.vsix
foreach ($vsix in $allVsixs) {
foreach ($plat in $platforms) {
if ($vsix.Name.Contains($plat)) {
$additionalPublishArgs += $vsix
}
}
}
}
Write-Host "Command run is: vsce $($additionalPublishArgs)."
If ("${{ parameters.test }}" -eq "true") {
Write-Host "In test mode, command is printed instead of run."
Write-Host "🔒 Verify PAT."
vsce verify-pat ms-dotnettools
}
Else {
vsce @additionalPublishArgs
}
displayName: 🚀 Publish to Marketplace
workingDirectory: $(Pipeline.Workspace)
env:
VSCE_PAT: $(VSCodeMarketplacePAT)
Write-Host "Command run is: vsce $($additionalPublishArgs)."
If ("${{ parameters.test }}") {
Write-Host "In test mode, command is printed instead of run."
Write-Host "🔒 Verify PAT."
vsce verify-pat ms-dotnettools
}
Else {
vsce @additionalPublishArgs
}
displayName: 🚀 Publish to Marketplace
workingDirectory: $(Pipeline.Workspace)
env:
VSCE_PAT: $(VSCodeMarketplacePAT)
- stage: 'TagRelease'
displayName: 'Tag release of vscode-csharp'
dependsOn: 'PublishStage'
condition: and(succeeded('PublishStage'), eq(variables['resources.pipeline.officialBuildCI.sourceBranch'], 'refs/heads/release'))
jobs:
- job: 'Tag'
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
displayName: 'Install Node.js 18.x'
inputs:
versionSpec: '18.x'
- checkout: self
clean: true
submodules: true
fetchTags: false
fetchDepth: 0
- pwsh: |
git checkout $(resources.pipeline.officialBuildCI.sourceCommit)
displayName: 'Checkout to release branch'
- pwsh: |
npm ci
npm install
npm install -g gulp
gulp installDependencies
displayName: 'Install dependencies.'
- pwsh: |
# build number is generated by nerdbank git versioning and set to AzureDev
gulp createTags --releaseVersion $(resources.pipeline.officialBuildCI.runName) --releaseCommit $(resources.pipeline.officialBuildCI.sourceCommit) --dryRun ${{ parameters.test }}
env:
GitHubPAT: $(BotAccount-dotnet-bot-content-rw-grained-pat)
displayName: 'Create release tags'
2 changes: 1 addition & 1 deletion azure-pipelines/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ steps:
Write-Host "Now running tests"
}
npm run test
npm run omnisharptest
displayName: 🧪 Run unit and integration tests

- task: PublishPipelineArtifact@1
Expand Down
1 change: 1 addition & 0 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ require('./tasks/testTasks');
require('./tasks/offlinePackagingTasks');
require('./tasks/backcompatTasks');
require('./tasks/localizationTasks');
require('./tasks/createTagsTasks');

// Disable warning about wanting an async function
// tslint:disable-next-line
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const config: Config = {
* We also have to include the __mocks__ folder. That folder must be next to node_modules so we can't move it,
* but if we specify roots, jest won't automatically pick it up. So we have to specify it here.
*/
roots: ['<rootDir>/test/jestUnitTests', '<rootDir>/__mocks__'],
roots: ['<rootDir>/test/unitTests', '<rootDir>/omnisharptest/omnisharpJestTests', '<rootDir>/__mocks__'],
};

export default config;

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit f4b9617

Please sign in to comment.