Skip to content

Commit

Permalink
Merge branch 'main' into removeWeakRef
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi authored Dec 18, 2021
2 parents 7dd619b + 785ce8c commit 39c483f
Show file tree
Hide file tree
Showing 1,021 changed files with 132,654 additions and 10,561 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"**/eng/pipelines/*.yml": "azure-pipelines"
}
}
3 changes: 3 additions & 0 deletions Roslyn.sln
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,9 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests", "src\Workspaces\Remote\ServiceHubTest\Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests.csproj", "{8D830CBB-CA6E-47D8-9FB8-9230AAD272F3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualStudio.LanguageServices.New.IntegrationTests", "src\VisualStudio\IntegrationTest\New.IntegrationTests\Microsoft.VisualStudio.LanguageServices.New.IntegrationTests.csproj", "{6272739B-31E4-483E-A3A5-2ABB5040ABF0}"
ProjectSection(ProjectDependencies) = postProject
{201EC5B7-F91E-45E5-B9F2-67A266CCE6FC} = {201EC5B7-F91E-45E5-B9F2-67A266CCE6FC}
EndProjectSection
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Expand Down
2 changes: 2 additions & 0 deletions Verify.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -build -restore -rebuild -pack -test -runAnalyzers -warnAsError %*"
62 changes: 62 additions & 0 deletions azure-pipelines-integration-dartlab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Roslyn integration test pipeline for validating against branch builds of VS.

trigger: none # Manual trigger for now

resources:
pipelines:
- pipeline: VisualStudioBuildUnderTest
source: DD-CB-ReleaseVS
branch: main
- pipeline: DartLab
source: DartLab
branch: main
repositories:
- repository: DartLabTemplates
type: git
name: DartLab.Templates
ref: refs/heads/dev/bradwhit/RemoveCheckoutNone

variables:
- name: XUNIT_LOGS
value: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)

stages:
- template: \stages\visual-studio\base.yml@DartLabTemplates
parameters:
displayName: VS Integration
testLabPoolName: VS-Platform2
visualStudioBootstrapperURI: https://vsdrop.corp.microsoft.com/file/v1/$(VisualStudio.BuildUnderTest.ProductsDropName);bootstrappers/Enterprise/vs_enterprise.exe
visualStudioInstallationParameters: --add Microsoft.VisualStudio.Component.NuGet --add Microsoft.VisualStudio.Component.Roslyn.Compiler --add Microsoft.Component.MSBuild --add Microsoft.NetCore.Component.Runtime.6.0 --add Microsoft.NetCore.Component.SDK --add Microsoft.Net.Component.4.7.2.TargetingPack --add Microsoft.VisualStudio.Component.Roslyn.LanguageServices --add Microsoft.VisualStudio.Component.FSharp --add Microsoft.ComponentGroup.ClickOnce.Publish --add Microsoft.NetCore.Component.DevelopmentTools --add Microsoft.VisualStudio.Component.MSODBC.SQL --add Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils --add Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime --add Microsoft.VisualStudio.Component.SQL.CLR --add Microsoft.VisualStudio.Component.CoreEditor --add Microsoft.VisualStudio.Workload.CoreEditor --add Microsoft.Net.Component.4.8.SDK --add Microsoft.Net.ComponentGroup.DevelopmentPrerequisites --add Microsoft.VisualStudio.Component.TypeScript.TSServer --add Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions --add Microsoft.VisualStudio.Component.JavaScript.TypeScript --add Microsoft.VisualStudio.Component.JavaScript.Diagnostics --add Microsoft.VisualStudio.Component.TextTemplating --add Component.Microsoft.VisualStudio.RazorExtension --add Microsoft.VisualStudio.Component.IISExpress --add Microsoft.VisualStudio.Component.Common.Azure.Tools --add Microsoft.Component.ClickOnce --add Microsoft.VisualStudio.Component.ManagedDesktop.Core --add Microsoft.VisualStudio.Component.SQL.SSDT --add Microsoft.VisualStudio.Component.SQL.DataSources --add Component.Microsoft.Web.LibraryManager --add Component.Microsoft.WebTools.BrowserLink.WebLivePreview --add Microsoft.VisualStudio.ComponentGroup.Web --add Microsoft.VisualStudio.Component.FSharp.WebTemplates --add Microsoft.VisualStudio.Component.DockerTools --add Microsoft.NetCore.Component.Web --add Microsoft.VisualStudio.Component.WebDeploy --add Microsoft.VisualStudio.Component.AppInsights.Tools --add Microsoft.VisualStudio.Component.Web --add Microsoft.Net.Component.4.8.TargetingPack --add Microsoft.Net.ComponentGroup.4.8.DeveloperTools --add Microsoft.VisualStudio.Component.AspNet45 --add Microsoft.VisualStudio.Component.AspNet --add Component.Microsoft.VisualStudio.Web.AzureFunctions --add Microsoft.VisualStudio.ComponentGroup.AzureFunctions --add Microsoft.VisualStudio.Component.Debugger.Snapshot --add Microsoft.VisualStudio.ComponentGroup.Web.CloudTools --add Microsoft.VisualStudio.Component.IntelliTrace.FrontEnd --add Microsoft.VisualStudio.Component.DiagnosticTools --add Microsoft.VisualStudio.Component.EntityFramework --add Microsoft.VisualStudio.Component.LiveUnitTesting --add Microsoft.VisualStudio.Component.Debugger.JustInTime --add Component.Microsoft.VisualStudio.LiveShare.2022 --add Microsoft.VisualStudio.Component.WslDebugging --add Microsoft.VisualStudio.Component.IntelliCode --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites --add Microsoft.ComponentGroup.Blend --add Microsoft.VisualStudio.Component.DotNetModelBuilder --add Microsoft.VisualStudio.Component.FSharp.Desktop --add Microsoft.VisualStudio.Component.PortableLibrary --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.Net.Component.4.6.TargetingPack --add Microsoft.VisualStudio.Component.VSSDK --add Microsoft.VisualStudio.ComponentGroup.VisualStudioExtension.Prerequisites --add Microsoft.Component.CodeAnalysis.SDK --add Microsoft.VisualStudio.Workload.VisualStudioExtension --installPath "C:\Test\VisualStudio" --quiet --norestart --wait
testExecutionJobStrategy:
maxParallel: 4
matrix:
debug_32:
_configuration: Debug
_oop64bit: false
debug_64:
_configuration: Debug
_oop64bit: true
release_32:
_configuration: Release
_oop64bit: false
release_64:
_configuration: Release
_oop64bit: true
testMachineTotalCount: 4
testAgentElevated: true
preTestMachineConfigurationStepList:
- checkout: none
- download: VisualStudioBuildUnderTest
- task: PowerShell@2
name: SetProductsDropName
displayName: Set 'VisualStudio.BuildUnderTest.ProductsDropName'
inputs:
filePath: $(DartLab.Path)\Scripts\VisualStudio\Build\Get-VisualStudioDropName.ps1
arguments: -DropNamePrefix 'Products' -VstsDropUrlsJson '$(Pipeline.Workspace)\VisualStudioBuildUnderTest\BuildArtifacts\VstsDropUrls.json' -OutVariableName 'VisualStudio.BuildUnderTest.ProductsDropName'
deployAndRunTestsStepList:
- template: eng/pipelines/test-integration-job.yml
parameters:
configuration: $(_configuration)
oop64bit: $(_oop64bit)
lspEditor: false
shallowCheckout: false
10 changes: 5 additions & 5 deletions azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,16 @@ stages:

- stage: build
displayName: Build and Test
pool:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2019

jobs:
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.0-vs-deps') }}:
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.1-vs-deps') }}:
- template: /eng/common/templates/job/onelocbuild.yml
parameters:
MirrorRepo: roslyn
MirrorBranch: release/dev17.0-vs-deps
MirrorBranch: release/dev17.1-vs-deps
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-ROSLYN'

Expand All @@ -81,9 +84,6 @@ stages:
- job: OfficialBuild
displayName: Official Build
timeoutInMinutes: 360
pool:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2019

steps:
- powershell: Write-Host "##vso[task.setvariable variable=SourceBranchName]$('$(Build.SourceBranch)'.Substring('refs/heads/'.Length))"
Expand Down
78 changes: 41 additions & 37 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ jobs:
configuration: Release
queueName: Build.Windows.Amd64.VS2022.Pre.Open

- template: eng/pipelines/test-windows-job.yml
parameters:
testRunName: 'Test Windows Desktop Debug 32'
jobName: Test_Windows_Desktop_Debug_32
buildJobName: Build_Windows_Debug
testArtifactName: Transport_Artifacts_Windows_Debug
configuration: Debug
testArguments: -testDesktop -test32
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- template: eng/pipelines/test-windows-job.yml
parameters:
testRunName: 'Test Windows Desktop Debug 32'
jobName: Test_Windows_Desktop_Debug_32
buildJobName: Build_Windows_Debug
testArtifactName: Transport_Artifacts_Windows_Debug
configuration: Debug
testArguments: -testDesktop -test32

- template: eng/pipelines/test-windows-job.yml
parameters:
Expand All @@ -57,14 +58,15 @@ jobs:
configuration: Debug
testArguments: -testCoreClr

- template: eng/pipelines/test-windows-job-single-machine.yml
parameters:
testRunName: 'Test Windows CoreClr Debug Single Machine'
jobName: Test_Windows_CoreClr_Debug_Single_Machine
buildJobName: Build_Windows_Debug
testArtifactName: Transport_Artifacts_Windows_Debug
configuration: Debug
testArguments: -testCoreClr
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- template: eng/pipelines/test-windows-job-single-machine.yml
parameters:
testRunName: 'Test Windows CoreClr Debug Single Machine'
jobName: Test_Windows_CoreClr_Debug_Single_Machine
buildJobName: Build_Windows_Debug
testArtifactName: Transport_Artifacts_Windows_Debug
configuration: Debug
testArguments: -testCoreClr

- template: eng/pipelines/test-windows-job.yml
parameters:
Expand All @@ -77,21 +79,22 @@ jobs:

- template: eng/pipelines/test-windows-job.yml
parameters:
testRunName: 'Test Windows Desktop Spanish Release 32'
jobName: Test_Windows_Desktop_Spanish_Release_32
testRunName: 'Test Windows Desktop Spanish Release 64'
jobName: Test_Windows_Desktop_Spanish_Release_64
buildJobName: Build_Windows_Release
testArtifactName: Transport_Artifacts_Windows_Release
configuration: Release
testArguments: -testDesktop -test32 -helixQueueName Windows.10.Amd64.Server19H1.ES.Open

- template: eng/pipelines/test-windows-job.yml
parameters:
testRunName: 'Test Windows Desktop Release 64'
jobName: Test_Windows_Desktop_Release_64
buildJobName: Build_Windows_Release
testArtifactName: Transport_Artifacts_Windows_Release
configuration: Release
testArguments: -testDesktop -test64
testArguments: -testDesktop -test64 -helixQueueName Windows.10.Amd64.Server19H1.ES.Open

- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- template: eng/pipelines/test-windows-job.yml
parameters:
testRunName: 'Test Windows Desktop Release 64'
jobName: Test_Windows_Desktop_Release_64
buildJobName: Build_Windows_Release
testArtifactName: Transport_Artifacts_Windows_Release
configuration: Release
testArguments: -testDesktop -test64

- template: eng/pipelines/test-windows-job.yml
parameters:
Expand Down Expand Up @@ -128,15 +131,16 @@ jobs:
configuration: Debug
testArguments: --testCoreClr --helixQueueName Ubuntu.1804.Amd64.Open

- template: eng/pipelines/test-unix-job-single-machine.yml
parameters:
testRunName: 'Test Linux Debug Single Machine'
jobName: Test_Linux_Debug_Single_Machine
buildJobName: Build_Unix_Debug
testArtifactName: Transport_Artifacts_Unix_Debug
configuration: Debug
testArguments: --testCoreClr
queueName: 'Build.Ubuntu.1804.amd64.Open'
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- template: eng/pipelines/test-unix-job-single-machine.yml
parameters:
testRunName: 'Test Linux Debug Single Machine'
jobName: Test_Linux_Debug_Single_Machine
buildJobName: Build_Unix_Debug
testArtifactName: Transport_Artifacts_Unix_Debug
configuration: Debug
testArguments: --testCoreClr
queueName: 'Build.Ubuntu.1804.amd64.Open'

- template: eng/pipelines/test-unix-job.yml
parameters:
Expand Down
11 changes: 6 additions & 5 deletions docs/Language Feature Status.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ efforts behind them.

| Feature | Branch | State | Developer | Reviewer | LDM Champ |
| ------- | ------ | ----- | --------- | -------- | --------- |
| [Newlines in interpolations](https://github.com/dotnet/csharplang/issues/4935) | main | [Merged in 17.1p1](https://github.com/dotnet/roslyn/issues/57154) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jcouv](https://github.com/jcouv), [chsienki](https://github.com/chsienki) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
| [List patterns](https://github.com/dotnet/csharplang/issues/3435) | [list-patterns](https://github.com/dotnet/roslyn/tree/features/list-patterns) | [Merged in 17.1p2](https://github.com/dotnet/roslyn/issues/51289) | [alrz](https://github.com/alrz) | [jcouv](https://github.com/jcouv), [333fred](https://github.com/333fred) | [333fred](https://github.com/333fred) |
| [Parameter null-checking](https://github.com/dotnet/csharplang/issues/2145) | [param-nullchecking](https://github.com/dotnet/roslyn/tree/features/param-nullchecking) | [In Progress](https://github.com/dotnet/roslyn/issues/36024) | [RikkiGibson](https://github.com/RikkiGibson), [fayrose](https://github.com/fayrose) | [cston](https://github.com/cston), [chsienki](https://github.com/chsienki) | [jaredpar](https://github.com/jaredpar) |
| [Raw string literals](https://github.com/dotnet/csharplang/issues/4304) | [RawStringLiterals](https://github.com/dotnet/roslyn/tree/features/features/RawStringLiterals) | [In Progress](https://github.com/dotnet/roslyn/issues/55306) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jcouv](https://github.com/jcouv) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
| [nameof(parameter)](https://github.com/dotnet/csharplang/issues/373) | main | [In Progress](https://github.com/dotnet/roslyn/issues/40524) | [jcouv](https://github.com/jcouv) | TBD | [jcouv](https://github.com/jcouv) |
| [Relax ordering of `ref` and `partial` modifiers](https://github.com/dotnet/csharplang/issues/946) | [ref-partial](https://github.com/dotnet/roslyn/tree/features/ref-partial) | In Progress | [alrz](https://github.com/alrz) | [gafter](https://github.com/gafter) | [jcouv](https://github.com/jcouv) |
| [Parameter null-checking](https://github.com/dotnet/csharplang/issues/2145) | [param-nullchecking](https://github.com/dotnet/roslyn/tree/features/param-nullchecking) | [In Progress](https://github.com/dotnet/roslyn/issues/36024) | [RikkiGibson](https://github.com/RikkiGibson), [fayrose](https://github.com/fayrose) | [cston](https://github.com/cston), [chsienki](https://github.com/chsienki) | [jaredpar](https://github.com/jaredpar) |
| [Generic attributes](https://github.com/dotnet/csharplang/issues/124) | [generic-attributes](https://github.com/dotnet/roslyn/tree/features/generic-attributes) | [Merged into 17.0p4 (preview langver)](https://github.com/dotnet/roslyn/issues/36285) | [AviAvni](https://github.com/AviAvni) | [RikkiGibson](https://github.com/RikkiGibson), [jcouv](https://github.com/jcouv) | [mattwar](https://github.com/mattwar) |
| [Default in deconstruction](https://github.com/dotnet/roslyn/pull/25562) | [decon-default](https://github.com/dotnet/roslyn/tree/features/decon-default) | [Implemented](https://github.com/dotnet/roslyn/issues/25559) | [jcouv](https://github.com/jcouv) | [gafter](https://github.com/gafter) | [jcouv](https://github.com/jcouv) |
| [List patterns](https://github.com/dotnet/csharplang/issues/3435) | [list-patterns](https://github.com/dotnet/roslyn/tree/features/list-patterns) | [In Progress](https://github.com/dotnet/roslyn/issues/51289) | [alrz](https://github.com/alrz) | [jcouv](https://github.com/jcouv), [333fred](https://github.com/333fred) | [333fred](https://github.com/333fred) |
| [Raw string literals](https://github.com/dotnet/csharplang/issues/4304) | [RawStringLiterals](https://github.com/dotnet/roslyn/tree/features/features/RawStringLiterals) | [In Progress](https://github.com/dotnet/roslyn/issues/55306) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jcouv](https://github.com/jcouv) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
| [Semi-auto-properties](https://github.com/dotnet/csharplang/issues/140) | [semi-auto-properties](https://github.com/dotnet/roslyn/tree/features/features/semi-auto-properties) | [In Progress](https://github.com/dotnet/roslyn/issues/57012) | [Youssef1313](https://github.com/Youssef1313) | TBD | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |
| [Required properties](https://github.com/dotnet/csharplang/issues/3630) | [required-properties](https://github.com/dotnet/roslyn/tree/features/features/required-properties) | [In Progress](https://github.com/dotnet/roslyn/issues/57046) | [333fred](https://github.com/333fred) | TBD | [333fred](https://github.com/333fred) |
| [Required members](https://github.com/dotnet/csharplang/issues/3630) | [required-members](https://github.com/dotnet/roslyn/tree/features/required-members) | [In Progress](https://github.com/dotnet/roslyn/issues/57046) | [333fred](https://github.com/333fred) | [jcouv](https://github.com/jcouv), [RikkiGibson](https://github.com/RikkiGibson) | [333fred](https://github.com/333fred) |
| [Top Level statement attribute specifiers](https://github.com/dotnet/csharplang/issues/5045) | [main-attributes](https://github.com/dotnet/roslyn/tree/features/features/main-attributes) | [In Progress](https://github.com/dotnet/roslyn/issues/57047) | [chsienki](https://github.com/chsienki) | TBD | [jaredpar](https://github.com/jaredpar) |
| [Primary Constructors](https://github.com/dotnet/csharplang/issues/2691) | [primary-constructors](https://github.com/dotnet/roslyn/tree/features/features/primary-constructors) | [In Progress](https://github.com/dotnet/roslyn/issues/57048) | TBD | TBD | [MadsTorgersen](https://github.com/MadsTorgersen) |
| [Params Span<T> + Stackalloc any array type](https://github.com/dotnet/csharplang/issues/1757) | [params-span](https://github.com/dotnet/roslyn/tree/features/features/params-span) | [In Progress](https://github.com/dotnet/roslyn/issues/57049) | [cston](https://github.com/cston) | TBD | [jaredpar](https://github.com/jaredpar) |
| [Newlines in interpolations](https://github.com/dotnet/csharplang/issues/4935) | main | [In Progress](https://github.com/dotnet/roslyn/issues/57154) | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) | [jcouv](https://github.com/jcouv), TBD | [CyrusNajmabadi](https://github.com/CyrusNajmabadi) |


# C# 10.0

Expand Down
23 changes: 22 additions & 1 deletion docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
}
```


3. In Visual Studio 17.1, `ref`/`ref readonly`/`in`/`out` are not allowed to be used on return/parameters of a method attributed with `UnmanagedCallersOnly`.
https://github.com/dotnet/roslyn/issues/57025
Expand All @@ -56,3 +55,25 @@ https://github.com/dotnet/roslyn/issues/57025
[UnmanagedCallersOnly]
static void M5(out int o) => throw null; // error CS8977: Cannot use 'ref', 'in', or 'out' in a method attributed with 'UnmanagedCallersOnly'.
```

4. Beginning with C# 11.0, `Length` and `Count` properties on countable and indexable types
are assumed to be non-negative for purpose of subsumption and exhaustiveness analysis of patterns and switches.
Those types can be used with implicit Index indexer and list patterns.

```csharp
void M(int[] i)
{
if (i is { Length: -1 }) {} // error: impossible under assumption of non-negative length
}
```

5. Starting with Visual Studio 17.1, format specifiers in interpolated strings can not contain curly braces (either `{` or `}`). In previous versions `{{` was interpreted as an escaped `{` and `}}` was interpreted as an escaped `}` char in the format specifier. Now the first `}` char in a format specifier ends the interpolation, and any `{` char is an error.
https://github.com/dotnet/roslyn/issues/5775
```csharp
using System;

Console.WriteLine($"{{{12:X}}}");

//prints now: "{C}" - not "{X}}"
```
Loading

0 comments on commit 39c483f

Please sign in to comment.