Skip to content

Commit

Permalink
Merge pull request #7497 from dotnet/merge/main-to-prerelease
Browse files Browse the repository at this point in the history
[automated] Merge branch 'main' => 'prerelease'
  • Loading branch information
dibarbet authored Aug 30, 2024
2 parents 154590a + 00212d9 commit dd6c175
Show file tree
Hide file tree
Showing 49 changed files with 2,570 additions and 240 deletions.
20 changes: 16 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,23 @@
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)

# Latest
* Update Roslyn to 4.12.0-3.24430.2 (PR: [#7496](https://github.com/dotnet/vscode-csharp/pull/7496))
* Bump Razor to 9.0.0-preview.24427.2 (PR: [#7471](https://github.com/dotnet/vscode-csharp/pull/7471))
* Suppress unique ids (#10791) (PR: [#10791](https://github.com/dotnet/razor/pull/10791))
* Self-versioned documents (#10747) (PR: [#10747](https://github.com/dotnet/razor/pull/10747))
* Remove ItemCollection from CodeRenderingContext (#10764) (PR: [#10764](https://github.com/dotnet/razor/pull/10764))
* Moving formatting service to common layer (#10761) (PR: [#10761](https://github.com/dotnet/razor/pull/10761))
* Allow LSP and cohosting to provide specialized methods to get a syntax tree (#10765) (PR: [#10765](https://github.com/dotnet/razor/pull/10765))
* Update NOTICE.txt (#10768) (PR: [#10768](https://github.com/dotnet/razor/pull/10768))
* Allow @@ as a fallback (#10752) (PR: [#10752](https://github.com/dotnet/razor/pull/10752))
* Support component rename from an end tag (#10762) (PR: [#10762](https://github.com/dotnet/razor/pull/10762))
* Bump xamltools to 17.12.35230.10 (PR: [#7493](https://github.com/dotnet/vscode-csharp/pull/7493))

# 2.45.17
* Fix check for rzls being present (PR: [#7462](https://github.com/dotnet/vscode-csharp/pull/7462))
* Bump Razor to 9.0.0-preview.24418.1 (PR: [#7456](https://github.com/dotnet/vscode-csharp/pull/7456))
* Don't add already known documents to the misc files project (#10753) (PR: [#10753](https://github.com/dotnet/razor/pull/10753))
* Remove ItemCollection from TagHelperDescriptorProviderContext (#10720) (PR: [#10720](https://github.com/dotnet/razor/pull/10720))
* Cohost inlay hint support (#10672) (PR: [#10672](https://github.com/dotnet/razor/pull/10672))
* Fix excerpt service to allow for multi line verbatim strings (#10675) (PR: [#10675](https://github.com/dotnet/razor/pull/10675))
* Fix attribute parsing recovery (#10620) (PR: [#10620](https://github.com/dotnet/razor/pull/10620))
* Turn off trailing whitespace triming in strings (#10646) (PR: [#10646](https://github.com/dotnet/razor/pull/10646))
Expand All @@ -24,7 +36,7 @@
* Bump xamltools to 17.12.35223.16 (PR: [#7464](https://github.com/dotnet/vscode-csharp/pull/7464))
* Added XAML Hot Reload support for x:FactoryMethod and x:Arguments

# 2.44.x
# 2.44.19
* Bump Roslyn to 4.12.0-2.24416.3 (PR: [#7448](https://github.com/dotnet/vscode-csharp/pull/7448))
* Use EnableCodeStyleSeverity instead of AnalysisLevel to control new diagnostic severity behavior (PR: [#73843](https://github.com/dotnet/roslyn/pull/73843))
* Cleanup LSP error reporting (PR: [#74530](https://github.com/dotnet/roslyn/pull/74530))
Expand All @@ -51,7 +63,7 @@
* Task 2187810: [VS Code] Add OnEnter rules to indent tags (PR: [#7426](https://github.com/dotnet/vscode-csharp/pull/7426))
* Fix completion handler bug that causes language server to crash (#7401) (PR: [#7406](https://github.com/dotnet/vscode-csharp/pull/7406))

# 2.41.x
# 2.41.26
* Bump Roslyn to 4.12.0-1.24376.3 (PR: [#7393](https://github.com/dotnet/vscode-csharp/pull/7393))
* Fix race condition in LSP FindAllReferences when linked files were involved.(PR: [#74566](https://github.com/dotnet/roslyn/pull/74566))
* Fix dll load issue when loading Razor projects in VSCode (PR: [#74570](https://github.com/dotnet/roslyn/pull/74570))
Expand All @@ -78,7 +90,7 @@
* `dotnet.implementType.insertionBehavior` to `dotnet.typeMembers.memberInsertionLocation`
* `dotnet.implementType.propertyGenerationBehavior` to `dotnet.typeMembers.propertyGenerationBehavior`

# 2.39.x
# 2.39.29
* Add language status bar item displaying project context for open files (PR: [#7321](https://github.com/dotnet/vscode-csharp/pull/7321), PR: [#7333](https://github.com/dotnet/vscode-csharp/pull/7333))
* Add language status bar item for workspace status (C# standalone) (PR: [#7254](https://github.com/dotnet/vscode-csharp/pull/7254), PR: [#7329])https://github.com/dotnet/vscode-csharp/pull/7329))
* Update Razor to 9.0.0-preview.24365.1 (PR: [#7354](https://github.com/dotnet/vscode-csharp/pull/7354))
Expand Down
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Setting up your local development environment for the vscode-csharp repository i

Before you start, make sure you have the following software installed on your machine:

* Node.js v18 ([v18.17.0 LTS](https://nodejs.org/en/blog/release/v18.17.0)).
* Node.js v18 ([v18.17.0 LTS](https://nodejs.org/en/blog/release/v20.17.0)).
* Note - Building with higher major versions of Node.js is not advised - it may work but we do not test it.
* Npm (The version shipped with node is fine)
* .NET 8.0 SDK (dotnet should be on your path)
Expand Down Expand Up @@ -141,6 +141,11 @@ Or, in VSCode settings (`Ctrl+,`):
3. Enable `razor.languageServer.debug`.
4. Set `razor.server.trace` to `Debug`. This gives you more detailed log messages in the output window.

### Updating NPM packages
We use the .NET eng AzDo artifacts feed https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet-public-npm/npm/registry/ with upstreams to the public npm registry.
Auth is required in order to pull new packages from the upstream. This can be done by running `vsts-npm-auth -config .npmrc`.
If you need to renew authorization, you can force it via `vsts-npm-auth -config .npmrc -F`

## Creating VSIX Packages for the Extension

To package this extension, we need to create VSIX Packages. The VSIX packages can be created using the gulp command `gulp vsix:release:package`. This will create all the platform specific VSIXs that you can then install manually in VSCode.
Expand Down
5 changes: 5 additions & 0 deletions azure-pipelines/install-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
steps:
- task: NodeTool@0
displayName: 'Install Node.js 20.x'
inputs:
versionSpec: '20.x'
5 changes: 1 addition & 4 deletions azure-pipelines/prereqs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ steps:
# The server package is downloaded from NuGet
- task: NuGetAuthenticate@1

- task: NodeTool@0
displayName: 'Install Node.js 18.x'
inputs:
versionSpec: '18.x'
- template: /azure-pipelines/install-node.yml@self

# Some tests use predefined docker images with a specific version of .NET installed.
# So we avoid installing .NET in those cases.
Expand Down
101 changes: 50 additions & 51 deletions azure-pipelines/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ parameters:
default: true

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

Expand Down Expand Up @@ -55,59 +53,63 @@ extends:
buildVersionToDownload: 'specific'
buildId: '$(resources.pipeline.officialBuildCI.runID)'
branchName: '$(resources.pipeline.officialBuildCI.sourceBranch)'
- template: /azure-pipelines/install-node.yml@self
- pwsh: |
npm install --global vsce
npm install --global @vscode/vsce
displayName: 'Install vsce'
- pwsh: |
# Choose whether to upload to prerelease or release based on the artifacts generated by the build pipeline.
$artifactFolder = ""
$uploadPrerelease = $true
if (Test-Path -Path "VSIX_Prerelease") {
$artifactFolder = "VSIX_Prerelease"
$uploadPrerelease = $true
} elseif (Test-Path -Path "VSIX_Release") {
$artifactFolder = "VSIX_Release"
$uploadPrerelease = $false
} else {
throw "No artifacts are downloaded."
}
- task: AzureCLI@2
displayName: '🚀 Publish to Marketplace'
inputs:
azureSubscription: 'VSCode Marketplace Publishing'
scriptType: "pscore"
scriptLocation: 'inlineScript'
workingDirectory: $(Pipeline.Workspace)
inlineScript: |
# Choose whether to upload to prerelease or release based on the artifacts generated by the build pipeline.
$artifactFolder = ""
$uploadPrerelease = $true
if (Test-Path -Path "VSIX_Prerelease") {
$artifactFolder = "VSIX_Prerelease"
$uploadPrerelease = $true
} elseif (Test-Path -Path "VSIX_Release") {
$artifactFolder = "VSIX_Release"
$uploadPrerelease = $false
} else {
throw "No artifacts are downloaded."
}
Write-Host "Uploading artifacts from $artifactFolder with prerelease=$uploadPrerelease"
Write-Host "Uploading artifacts from $artifactFolder with prerelease=$uploadPrerelease"
# Our build pipeline would generated build based on attempt number. Publishing the latest attempt.
$allArtifacts = Get-ChildItem -Path "$artifactFolder*" | Sort-Object -Descending
if ($allArtifacts.Length -eq 0) {
throw "No artifacts in $artifactFolder"
}
# Our build pipeline would generated build based on attempt number. Publishing the latest attempt.
$allArtifacts = Get-ChildItem -Path "$artifactFolder*" | Sort-Object -Descending
if ($allArtifacts.Length -eq 0) {
throw "No artifacts in $artifactFolder"
}
$publishArtifacts = $allArtifacts[0]
Write-Host "All artifacts: $($allArtifacts). Publishing $($publishArtifacts)."
$publishArtifacts = $allArtifacts[0]
Write-Host "All artifacts: $($allArtifacts). Publishing $($publishArtifacts)."
$basePublishArgs = , "publish"
If ( $uploadPrerelease ) {
$basePublishArgs += "--pre-release"
Write-Host "Publish to pre-release channel."
} Else {
Write-Host "Publish to release channel."
}
$basePublishArgs += '--packagePath'
$publishArgs = $basePublishArgs + (Get-ChildItem $publishArtifacts\*.vsix | Sort-Object Name -Descending |% { $_ })
$basePublishArgs = , "publish --azure-credential"
If ( $uploadPrerelease ) {
$basePublishArgs += "--pre-release"
Write-Host "Publish to pre-release channel."
} Else {
Write-Host "Publish to release channel."
}
$basePublishArgs += '--packagePath'
$publishArgs = $basePublishArgs + (Get-ChildItem $publishArtifacts\*.vsix | Sort-Object Name -Descending |% { $_ })
If ("${{ parameters.test }}" -eq "true") {
Write-Host "In test mode, command is printed instead of run."
Write-Host "##[command]vsce $publishArgs"
If ("${{ parameters.test }}" -eq "true") {
Write-Host "In test mode, command is printed instead of run."
Write-Host "##[command]vsce $publishArgs"
Write-Host "🔒 Verify PAT."
vsce verify-pat ms-dotnettools
}
Else {
Write-Host "##[command]vsce $publishArgs"
vsce @publishArgs
}
displayName: 🚀 Publish to Marketplace
workingDirectory: $(Pipeline.Workspace)
env:
VSCE_PAT: $(VSCodeMarketplacePAT)
Write-Host "🔒 Verify PAT."
vsce verify-pat --azure-credential ms-dotnettools
}
Else {
Write-Host "##[command]vsce $publishArgs"
vsce @publishArgs
}
- stage: 'TagRelease'
displayName: 'Tag release of vscode-csharp'
dependsOn: 'PublishStage'
Expand All @@ -119,15 +121,12 @@ extends:
image: 1es-ubuntu-2204
os: linux
steps:
- task: NodeTool@0
displayName: 'Install Node.js 18.x'
inputs:
versionSpec: '18.x'
- checkout: self
clean: true
submodules: true
fetchTags: false
fetchDepth: 0
- template: /azure-pipelines/install-node.yml@self
- pwsh: |
git checkout $(resources.pipeline.officialBuildCI.sourceCommit)
displayName: 'Checkout build source branch'
Expand Down
Loading

0 comments on commit dd6c175

Please sign in to comment.