Skip to content

Commit

Permalink
Update to v2.7.25
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadsammy committed Oct 24, 2023
2 parents 0bbeb05 + bff3482 commit a1c8709
Show file tree
Hide file tree
Showing 390 changed files with 35,545 additions and 4,489 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ out
.debugger/
.razor/
.razoromnisharp/
.razortelemetry/
.vscode-test/
dist/
*.razor.json
Expand Down
117 changes: 80 additions & 37 deletions .vscode/launch.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
"omnisharp.autoStart": false,
"editor.formatOnSave": false,
"eslint.lintTask.enable": true,
"dotnet.defaultSolution": "disable"
"dotnet.defaultSolution": "disable",
"jest.autoRun": "off"
}
6 changes: 6 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
!.omnisharp/**
!.razor/**
!.razoromnisharp/**
!.razortelemetry/**
.rpt2_cache/**
.github/**
.vscode/**
Expand All @@ -15,6 +16,11 @@ server/**
src/**
tasks/**
test/**
omnisharptest/**
__mocks__/**
jest.config.ts
baseJestConfig.ts
.prettierignore
typings/**
vsix/**
node_modules
Expand Down
137 changes: 120 additions & 17 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ VSIXs can be created using the gulp command `gulp vsix:release:package`. This w

To update the version of the roslyn server used by the extension do the following:
1. Find the the Roslyn signed build you want from [here](https://dnceng.visualstudio.com/internal/_build?definitionId=327&_a=summary). Typically the latest successful build of main is fine.
2. In the official build stage, look for the `Publish Assets` step. In there you will see it publishing the `Microsoft.CodeAnalysis.LanguageServer` package with some version, e.g. `4.6.0-3.23158.4`. Take note of that version number.
2. In the official build stage, look for the `Publish Assets` step. In there you will see it publishing the `Microsoft.CodeAnalysis.LanguageServer.neutral` package with some version, e.g. `4.6.0-3.23158.4`. Take note of that version number.
3. In the [package.json](package.json) inside the `defaults` section update the `roslyn` key to point to the version number you found above in step 2.
4. Build and test the change (make sure to run `gulp installDependencies` to get the new version!). If everything looks good, submit a PR.
* Adding new package versions might require authentication, run with the `--interactive` flag to login. You may need to install [azure artifacts nuget credential provider](https://github.com/microsoft/artifacts-credprovider#installation-on-windows) to run interactive authentication.
4. Ensure that version of the package is in the proper feeds by running `gulp updateRoslynVersion`. Note: you may need to install the [Azure Artifacts NuGet Credential Provider](https://github.com/microsoft/artifacts-credprovider#installation-on-windows) to run interactive authentication.
5. Build and test the change. If everything looks good, submit a PR.
11 changes: 11 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Support

## How to file issues and get help

This project uses GitHub Issues to track bugs and feature requests. Please search the [existing issues](https://github.com/dotnet/vscode-csharp/issues) before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new Issue.

For help and questions about using this project, please see the [README](https://github.com/dotnet/vscode-csharp/blob/main/README.md).

## Microsoft Support Policy

Support for this project is limited to the resources listed above.
25 changes: 9 additions & 16 deletions azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,16 @@ trigger:
- release
pr: none

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

stages:
- stage: Build
dependsOn: []
jobs:
- job: Build
steps:
- template: azure-pipelines/build.yml
parameters:
prereleaseFlag: $(prereleaseFlag)
pool:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Ubuntu.2204.Amd64
- template: azure-pipelines/build.yml
parameters:
versionNumberOverride: ${{ parameters.versionNumberOverride }}

# TODO: add compliance, signing.
57 changes: 24 additions & 33 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,53 +11,44 @@ pr:
- release
- main

variables:
${{ if eq(variables['Build.SourceBranchName'], 'release') }}:
prereleaseFlag: ''
${{ else }}:
prereleaseFlag: '--prerelease'

stages:
- stage: Build
dependsOn: []
jobs:
- job: Build
steps:
- template: azure-pipelines/build.yml
parameters:
prereleaseFlag: $(prereleaseFlag)
pool:
name: NetCore-Public
demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
- template: azure-pipelines/build.yml

- stage: Test
displayName: Test
dependsOn: []
jobs:
- job: Test
strategy:
matrix:
linux:
demandsName: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
windows:
demandsName: ImageOverride -equals 1es-windows-2022-open
pool:
name: NetCore-Public
demands: $(demandsName)
steps:
- template: azure-pipelines/test.yml
- template: azure-pipelines/test.yml
parameters:
jobName: Linux
poolName: NetCore-Public
demandsName: 1es-ubuntu-2004-open

- template: azure-pipelines/test.yml
parameters:
jobName: Windows
poolName: NetCore-Public
demandsName: 1es-windows-2022-open

- stage: Test_Omnisharp
displayName: Test Omnisharp
- template: azure-pipelines/test.yml
parameters:
jobName: MacOS
poolName: Azure Pipelines
vmImageName: macOS-13

- stage: Test_OmniSharp
displayName: Test OmniSharp
dependsOn: []
jobs:
- job: Test
strategy:
matrix:
linux:
demandsName: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
demandsName: 1es-ubuntu-2004-open
windows:
demandsName: 1es-windows-2022-open
pool:
name: NetCore-Public
demands: $(demandsName)
demands: ImageOverride -equals $(demandsName)
steps:
- template: azure-pipelines/test-omnisharp.yml
75 changes: 56 additions & 19 deletions azure-pipelines/build.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,63 @@
parameters:
- name: prereleaseFlag
- name: versionNumberOverride
type: string
default: 'default'

steps:
- checkout: self
clean: true
submodules: true
fetchTags: false
fetchDepth: 0
stages:
- stage: Build
displayName: 'Build VSIXs'
jobs:
- job:
displayName: 'Build Prerelease VSIXs'
steps:
- checkout: self
clean: true
submodules: true
fetchTags: false
fetchDepth: 0

- template: prereqs.yml
- template: prereqs.yml
parameters:
versionNumberOverride: ${{ parameters.versionNumberOverride }}

- script: gulp 'vsix:release:package' ${{ parameters.prereleaseFlag }}
displayName: 'Build VSIXs'
- script: gulp 'vsix:release:package' --prerelease
displayName: 'Build VSIXs'

- task: PublishPipelineArtifact@1
# Run the publish step so we have vsix's even if the tests fail.
condition: succeededOrFailed()
displayName: 'Publish VSIXs'
inputs:
targetPath: '$(Build.SourcesDirectory)/vsix'
artifactName: 'VSIX_Prerelease_$(System.JobAttempt)'

- script: npm run omnisharptest:artifacts
displayName: 'Run artifacts tests'

- job:
displayName: 'Build Release VSIXs'
steps:
- checkout: self
clean: true
submodules: true
fetchTags: false
fetchDepth: 0

- template: prereqs.yml
parameters:
versionNumberOverride: ${{ parameters.versionNumberOverride }}

- script: gulp 'vsix:release:package'
displayName: 'Build VSIXs'

- task: PublishPipelineArtifact@1
# Run the publish step so we have vsix's even if the tests fail.
condition: succeededOrFailed()
displayName: 'Publish VSIXs'
inputs:
targetPath: '$(Build.SourcesDirectory)/vsix'
artifactName: 'VSIXs - Attempt $(System.JobAttempt)'
- task: PublishPipelineArtifact@1
# Run the publish step so we have vsix's even if the tests fail.
condition: succeededOrFailed()
displayName: 'Publish VSIXs'
inputs:
targetPath: '$(Build.SourcesDirectory)/vsix'
artifactName: 'VSIX_Release_$(System.JobAttempt)'

- script: npm run omnisharptest:artifacts
displayName: 'Run artifacts tests'
- script: npm run omnisharptest:artifacts
displayName: 'Run artifacts tests'

20 changes: 15 additions & 5 deletions azure-pipelines/prereqs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
parameters:
- name: versionNumberOverride
type: string
default: 'default'

steps:

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

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

# If we want to override the version, update the version.json here - vsix packaging will see this value
# and use it to set the version number in the package.json.
- ${{ if ne(parameters.versionNumberOverride, 'default') }}:
- script: $(Agent.BuildDirectory)/nbgv set-version ${{ parameters.versionNumberOverride }}
displayName: 'Override version number'

# Set the CI build number to the VSIX version we're creating from this build.
- script: $(Agent.BuildDirectory)/nbgv cloud
displayName: Set pipeline build number

- script: |
npm ci
npm i -g gulp
displayName: 'Install dependencies'

- script: npm run compile
displayName: 'Compile'

- script: npm run vscode:prepublish
displayName: 'Prepublish VSIXs'
23 changes: 15 additions & 8 deletions azure-pipelines/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ parameters:
- name: test
type: boolean
default: true
- name: uploadPrerelease
type: boolean
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)
Expand Down Expand Up @@ -44,8 +47,15 @@ stages:
npm install --global vsce
displayName: 'Install vsce'
- pwsh: |
$artifactFolderPrefix = "VSIX_Release_"
if ("${{ parameters.uploadPrerelease }}" -eq "true") {
$artifactFolderPrefix = "VSIX_Prerelease_"
}
Write-Host "Using artifacts from $artifactFolderPrefix"
# Our build pipeline would generated build based on attempt number. Publishing the latest attempt.
$allArtifacts = Get-ChildItem -Path "VSIXs - Attempt*" | Sort-Object -Descending
$allArtifacts = Get-ChildItem -Path "$artifactFolderPrefix*" | Sort-Object -Descending
if ($allArtifacts.Length -eq 0) {
throw "No Artifacts is downloaded."
}
Expand All @@ -54,14 +64,11 @@ stages:
Write-Host "All artifacts: $($allArtifacts). Publishing $($publishArtifacts)."
$basePublishArgs = , "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") {
If ("${{ parameters.uploadPrerelease }}" -eq "true") {
$basePublishArgs += "--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)."
Write-Host "Publish to release channel."
}
$basePublishArgs += '--packagePath'
Expand Down Expand Up @@ -92,7 +99,7 @@ stages:
- stage: 'TagRelease'
displayName: 'Tag release of vscode-csharp'
dependsOn: 'PublishStage'
condition: and(succeeded('PublishStage'), eq(variables['resources.pipeline.officialBuildCI.sourceBranch'], 'refs/heads/release'))
condition: succeeded('PublishStage')
jobs:
- job: 'Tag'
pool:
Expand All @@ -109,7 +116,7 @@ stages:
fetchDepth: 0
- pwsh: |
git checkout $(resources.pipeline.officialBuildCI.sourceCommit)
displayName: 'Checkout to release branch'
displayName: 'Checkout build source branch'
- pwsh: |
npm ci
npm install
Expand Down
14 changes: 5 additions & 9 deletions azure-pipelines/test-omnisharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ steps:

- template: prereqs.yml

- pwsh: |
if ($IsLinux) {
Write-Host "Activating screen emulation"
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
$env:DISPLAY=':99.0'
Write-Host "Now running tests"
}
- template: test-prereqs.yml

npm run omnisharptest
- script: npm run omnisharptest
displayName: 🧪 Run unit and integration tests
env:
DISPLAY: :99.0

- task: PublishPipelineArtifact@1
condition: failed()
displayName: 'Upload integration test logs'
inputs:
targetPath: '$(Build.SourcesDirectory)/.vscode-test/user-data/logs'
artifactName: 'VSCode Test Logs ($(Agent.JobName)-$(System.JobAttempt))'
artifactName: 'VSCode Test OmniSharp Logs ($(Agent.JobName)-$(System.JobAttempt))'
12 changes: 12 additions & 0 deletions azure-pipelines/test-prereqs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
steps:

- script: npm run vscode:prepublish
displayName: 'Prepublish VSIXs'

# We need to download the roslyn language server for the current platform to run integration tests against it.
- script: gulp installDependencies
displayName: 'Install Roslyn Language Server'

- script: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
displayName: 'Activate screen emulation'
condition: eq(variables['Agent.OS'], 'Linux')
Loading

0 comments on commit a1c8709

Please sign in to comment.