Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 41 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,38 @@
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"args": ["test:integration:razor:cohost"],
"cwd": "${workspaceFolder}"
},
{
"type": "node",
"request": "launch",
"name": "Debug Gulp Task",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"args": ["${input:gulpTask}"],
"cwd": "${workspaceFolder}",
"sourceMaps": true,
"skipFiles": ["<node_internals>/**"]
},
{
"type": "node",
"request": "launch",
"name": "Debug gulp insertion:roslyn",
"preLaunchTask": "build",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"args": [
"insertion:roslyn",
"--assetManifestPath=./test-manifests",
"--roslynRepoPath=../roslyn",
"--roslynEndSHA=2eaa09890be9bdc5ea662d54129991355e5c60bb",
"--roslynBuildNumber=5.0.0-2.25430.3",
"--roslynBuildId=2783326",
"--targetBranch=main",
"--githubPAT=${input:githubPAT}",
"--dryRun=false"
],
"cwd": "${workspaceFolder}",
"console": "externalTerminal",
"sourceMaps": true,
"skipFiles": ["<node_internals>/**"]
}
],
"inputs": [
Expand All @@ -275,9 +307,15 @@
"options": ["singleCsproj", "RazorApp", "slnWithCsproj", "slnFilterWithCsproj", "slnWithGenerator"]
},
{
"id": "gulpTaskName",
"description": "The name of the gulp task to debug",
"type": "promptString"
"id": "gulpTask",
"type": "promptString",
"description": "Enter the gulp task name to debug"
},
{
"id": "githubPAT",
"type": "promptString",
"description": "Enter your GitHub Personal Access Token",
"password": true
}
]
}
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,55 @@
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)

# 2.90.x


* Bump Roslyn to 5.0.0-2.25430.3 (PR: [#6](https://github.com/dotnet/vscode-csharp/pull/6))
* Remove the 'force compute' entrypoint for diagnostics (PR: [#80060](https://github.com/dotnet/roslyn/pull/80060))
* Update VSInternalContinueCharacter* serialization (PR: [#80085](https://github.com/dotnet/roslyn/pull/80085))
* Switch diagnostic parameter to being an array instead of a single value (PR: [#80084](https://github.com/dotnet/roslyn/pull/80084))
* Keep necessary parentheses around a collection expression. (PR: [#80083](https://github.com/dotnet/roslyn/pull/80083))
* Don't count empty script extensions as potential script files (PR: [#80068](https://github.com/dotnet/roslyn/pull/80068))
* Fix issue reporting diagnostic in additional file when diagnostic produced by a source generator (PR: [#80071](https://github.com/dotnet/roslyn/pull/80071))
* Always run the razor generator even in balanced mode (PR: [#79510](https://github.com/dotnet/roslyn/pull/79510))
* Remove flag controlling if non-local diagnostics should be returned when getting diagnostics for a document. (PR: [#80044](https://github.com/dotnet/roslyn/pull/80044))
* Cache project analyzers (PR: [#80050](https://github.com/dotnet/roslyn/pull/80050))
* Cache diagnostic analyzer computation (PR: [#80045](https://github.com/dotnet/roslyn/pull/80045))
* Remove parameter always passed the same value (PR: [#80042](https://github.com/dotnet/roslyn/pull/80042))
* Update doc for IMethodSymbol.IsExtensionMethod (PR: [#80016](https://github.com/dotnet/roslyn/pull/80016))
* Don't cache known-broken compositions (PR: [#80021](https://github.com/dotnet/roslyn/pull/80021))
* Cleanup methods in DiagAnalyzerService (PR: [#80013](https://github.com/dotnet/roslyn/pull/80013))
* Simplify processing of errors reported by the build (PR: [#79964](https://github.com/dotnet/roslyn/pull/79964))
* Additional cleanup of the DiagnosticAnalyzerServier (PR: [#80005](https://github.com/dotnet/roslyn/pull/80005))
* Fix Code Lens around source generated files (PR: [#79992](https://github.com/dotnet/roslyn/pull/79992))
* Remove superflous DiagService api that can be achieved with existing apis (PR: [#80007](https://github.com/dotnet/roslyn/pull/80007))
* Generate `init` accessor for required properties inside `readonly struct`s (PR: [#80004](https://github.com/dotnet/roslyn/pull/80004))
* Remove existing low level diag oop code now that it's all handled at higher levels. (PR: [#79994](https://github.com/dotnet/roslyn/pull/79994))
* Allow large InlineHint ArrayBuilder pooling (PR: [#79857](https://github.com/dotnet/roslyn/pull/79857))
* Reduce allocations obtaining classified spans in ClassifierHelper (PR: [#79856](https://github.com/dotnet/roslyn/pull/79856))
* Compute span diagnostics in oop (PR: [#79991](https://github.com/dotnet/roslyn/pull/79991))
* Allow Razor cohosting to work with non-Razor SDK projects (PR: [#79953](https://github.com/dotnet/roslyn/pull/79953))
* Move computation of deprioritized analyzers to oop (PR: [#79989](https://github.com/dotnet/roslyn/pull/79989))
* EnC: Fix symbol mapping of delegates with indexed name (PR: [#79837](https://github.com/dotnet/roslyn/pull/79837))
* Emit telemetry 'durations' with known radix point '.' (PR: [#79988](https://github.com/dotnet/roslyn/pull/79988))
* Move logic up into DiagService (PR: [#79985](https://github.com/dotnet/roslyn/pull/79985))
* Move the StateManager type up to the DiagnosticService from the DiagnosticIncrementalANalyzer (PR: [#79984](https://github.com/dotnet/roslyn/pull/79984))
* Immediately remote diagnostics call to OOP (PR: [#79983](https://github.com/dotnet/roslyn/pull/79983))
* Build Microsoft.CodeAnalysis.SemanticSearch.Extension ref assembly for use in semantic search queries (PR: [#79972](https://github.com/dotnet/roslyn/pull/79972))
* Only cache compilation if we have the same set of analyzers (PR: [#79978](https://github.com/dotnet/roslyn/pull/79978))
* Delete unused property (PR: [#79963](https://github.com/dotnet/roslyn/pull/79963))
* Update 'use expr body' to be a purely syntactic analyzer (PR: [#79979](https://github.com/dotnet/roslyn/pull/79979))
* Mark 'Use expr body' as a syntax-only fixer (PR: [#79971](https://github.com/dotnet/roslyn/pull/79971))
* ?? MSBuildWorkspaceDirectory - Fallback to AppContext.BaseDirectory when Assembly Location is empty (PR: [#79934](https://github.com/dotnet/roslyn/pull/79934))
* Merge runtime async support into main (PR: [#79833](https://github.com/dotnet/roslyn/pull/79833))
* Implement "Simplify property accessor" feature (PR: [#79754](https://github.com/dotnet/roslyn/pull/79754))
* Redo how and when we report source generator telemetry (PR: [#79951](https://github.com/dotnet/roslyn/pull/79951))
* Allow MEF components to supply assembly path resolvers (PR: [#79218](https://github.com/dotnet/roslyn/pull/79218))
* Allow Razor to hook up the source generator in misc files (PR: [#79891](https://github.com/dotnet/roslyn/pull/79891))
* Block ENC for extension blocks (PR: [#79883](https://github.com/dotnet/roslyn/pull/79883))
* Upgrade servicehub.client to fix test source discovery (PR: [#79899](https://github.com/dotnet/roslyn/pull/79899))
* Update package restore error message. (PR: [#79876](https://github.com/dotnet/roslyn/pull/79876))
* Baseline struct lifting tests (PR: [#79505](https://github.com/dotnet/roslyn/pull/79505))

* Bump Razor to 10.0.0-preview.25416.1 (PR: [#8557](https://github.com/dotnet/vscode-csharp/pull/8557))
* Fix range formatting in the presence of K&R braces (PR: [#12121](https://github.com/dotnet/razor/pull/12121))
* Add codelens endpoints and services for cohosting (PR: [#12078](https://github.com/dotnet/razor/pull/12078))
Expand Down
101 changes: 101 additions & 0 deletions azure-pipelines/dotnet-vscode-csharp-insertion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
trigger: none
pr: none

parameters:
- name: targetBranch
displayName: Target Branch for PR
type: string
default: main

resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
- repository: RoslynMirror
type: git
name: internal/dotnet-roslyn
pipelines:
- pipeline: officialBuildCI
source: dotnet-roslyn-official
project: internal
branch: main
trigger: none

variables:
- name: RoslynEndSHA
value: $(resources.pipeline.officialBuildCI.sourceCommit)
- name: RoslynBuildNumber
value: $(resources.pipeline.officialBuildCI.runName)
- name: RoslynBuildId
value: $(resources.pipeline.officialBuildCI.runID)
- template: dotnet-variables.yml

extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: netcore1espool-internal
image: 1es-ubuntu-2204
os: linux
stages:
- stage: BumpRoslyn
displayName: Bump Roslyn Version
jobs:
- job: ProcessBump
displayName: Process Roslyn Bump
pool:
name: netcore1espool-internal
image: 1es-ubuntu-2204
os: linux
steps:
- checkout: self
persistCredentials: true

- task: UseDotNet@2
displayName: Install .NET SDK
inputs:
version: $(defaultDotnetVersion)

- template: install-node.yml

- task: DownloadPipelineArtifact@2
displayName: Download Asset Manifests
inputs:
source: specific
project: internal
pipeline: dotnet-roslyn-official
runVersion: specific
runId: $(RoslynBuildId)
artifact: AssetManifests
path: $(Pipeline.Workspace)/AssetManifests

- pwsh: |
npm ci
npm install
npm install -g gulp
gulp installDependencies
displayName: 'Install npm dependencies and gulp'
- checkout: RoslynMirror
displayName: 'Checkout Roslyn repository'
path: roslyn

- script: |
echo "Installing roslyn-tools..."
dotnet tool install -g Microsoft.RoslynTools --prerelease --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json
echo "Verifying roslyn-tools installation..."
dotnet tool list -g
roslyn-tools --help
displayName: 'Install roslyn-tools CLI'

- task: Npm@1
displayName: Run Roslyn insertion
env:
GITHUB_TOKEN: $(System.AccessToken)
GitHubPAT: $(System.AccessToken)
inputs:
command: custom
customCommand: 'run gulp -- insertion:roslyn --assetManifestPath=$(Pipeline.Workspace)/AssetManifests --roslynRepoPath=$(Pipeline.Workspace)/roslyn --roslynEndSHA=$(RoslynEndSHA) --roslynBuildNumber=$(RoslynBuildNumber) --roslynBuildId=$(RoslynBuildId) --targetBranch=${{ parameters.targetBranch }} --githubPAT=$(System.AccessToken) --dryRun=false'


1 change: 1 addition & 0 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ require('./tasks/debuggerTasks');
require('./tasks/snapTasks');
require('./tasks/signingTasks');
require('./tasks/profilingTasks');
require('./tasks/insertionTasks');
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"workspace"
],
"defaults": {
"roslyn": "5.0.0-2.25412.5",
"omniSharp": "1.39.14",
"roslyn": "5.0.0-2.25430.3",
"omniSharp": "1.39.14",
"razor": "10.0.0-preview.25419.3",
"razorOmnisharp": "7.0.0-preview.23363.1",
"xamlTools": "17.14.36106.43"
Expand Down
56 changes: 2 additions & 54 deletions tasks/createTagsTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
*--------------------------------------------------------------------------------------------*/

import * as gulp from 'gulp';
import * as fs from 'fs';
import minimist from 'minimist';
import { Octokit } from '@octokit/rest';
import { allNugetPackages, NugetPackageInfo, platformSpecificPackages } from './offlinePackagingTasks';
import { PlatformInformation } from '../src/shared/platform';
import path from 'path';
import { allNugetPackages } from './offlinePackagingTasks';
import { getCommitFromNugetAsync } from './gitHelpers';

interface CreateTagsOptions {
releaseVersion: string;
Expand Down Expand Up @@ -194,53 +192,3 @@ function logWarning(message: string): void {
function logError(message: string): void {
console.log(`##vso[task.logissue type=error]${message}`);
}

async function getCommitFromNugetAsync(packageInfo: NugetPackageInfo): Promise<string | null> {
const packageJsonString = fs.readFileSync('./package.json').toString();
const packageJson = JSON.parse(packageJsonString);
const packageVersion = packageJson['defaults'][packageInfo.packageJsonName];
if (!packageVersion) {
logError(`Can't find ${packageInfo.packageJsonName} version in package.json`);
return null;
}

const platform = await PlatformInformation.GetCurrent();
const vsixPlatformInfo = platformSpecificPackages.find(
(p) => p.platformInfo.platform === platform.platform && p.platformInfo.architecture === platform.architecture
)!;

const packageName = packageInfo.getPackageName(vsixPlatformInfo);
console.log(`${packageName} version is ${packageVersion}`);

// Nuget package should exist under out/.nuget/ since we have run the install dependencies task.
// Package names are always lower case in the .nuget folder.
const packageDir = path.join('out', '.nuget', packageName.toLowerCase(), packageVersion);
const nuspecFiles = fs.readdirSync(packageDir).filter((file) => file.endsWith('.nuspec'));

if (nuspecFiles.length === 0) {
logError(`No .nuspec file found in ${packageDir}`);
return null;
}

if (nuspecFiles.length > 1) {
logError(`Multiple .nuspec files found in ${packageDir}`);
return null;
}

const nuspecFilePath = path.join(packageDir, nuspecFiles[0]);
const nuspecFile = fs.readFileSync(nuspecFilePath).toString();
const results = /commit="(.*)"/.exec(nuspecFile);
if (results == null || results.length == 0) {
logError('Failed to find commit number from nuspec file');
return null;
}

if (results.length != 2) {
logError('Unexpected regex match result from nuspec file.');
return null;
}

const commitNumber = results[1];
console.log(`commitNumber is ${commitNumber}`);
return commitNumber;
}
Loading