Skip to content

Commit

Permalink
Merge pull request #58068 from dotnet/main
Browse files Browse the repository at this point in the history
Update features/rename_ui_rework
  • Loading branch information
JoeRobich authored Dec 2, 2021
2 parents 739f45e + 6493157 commit 1c07b7f
Show file tree
Hide file tree
Showing 605 changed files with 26,586 additions and 7,087 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
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
12 changes: 11 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,14 @@ 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
}
```
24 changes: 12 additions & 12 deletions docs/contributing/Building, Debugging, and Testing on Unix.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Building, Debugging and Testing on Unix
This guide is meant to help developers setup an environment for debugging / contributing to Roslyn from Linux.
Particularly for developers who aren't experienced with .NET Core development on Linux.
This guide is meant to help developers setup an environment for debugging / contributing to Roslyn from Linux.
Particularly for developers who aren't experienced with .NET Core development on Linux.

## Working with the code
1. Ensure the commands `git` and `curl` are available
Expand All @@ -12,7 +12,7 @@ Particularly for developers who aren't experienced with .NET Core development on
1. Install [VS Code](https://code.visualstudio.com/Download)
- After you install VS Code, install the [C# extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp)
- Important tip: You can look up editor commands by name by hitting *Ctrl+Shift+P*, or by hitting *Ctrl+P* and typing a `>` character. This will help you get familiar with editor commands mentioned below. On a Mac, use ** instead of *Ctrl*.
2. Install the [.NET 6.0 RC 2 SDK](https://dotnet.microsoft.com/download/dotnet-core/6.0).
2. Install the [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/6.0).
3. You can build from VS Code by running the *Run Build Task* command, then selecting an appropriate task such as *build* or *build current project* (the latter builds the containing project for the current file you're viewing in the editor).
4. You can run tests from VS Code by opening a test class in the editor, then using the *Run Tests in Context* and *Debug Tests in Context* editor commands. You may want to bind these commands to keyboard shortcuts that match their Visual Studio equivalents (**Ctrl+R, T** for *Run Tests in Context* and **Ctrl+R, Ctrl+T** for *Debug Tests in Context*).

Expand All @@ -23,14 +23,14 @@ To run all tests in a single project, it's recommended to use the `dotnet test p

## GitHub
The best way to clone and push is to use SSH. On Windows you typically use HTTPS and this is not directly compatible
with two factor authentication (requires a PAT). The SSH setup is much simpler and GitHub has a great HOWTO for
with two factor authentication (requires a PAT). The SSH setup is much simpler and GitHub has a great HOWTO for
getting this setup.

https://help.github.com/articles/connecting-to-github-with-ssh/

## Debugging test failures
The best way to debug is using lldb with the SOS plugin. This is the same SOS as used in WinDbg and if you're familiar
with it then lldb debugging will be pretty straight forward.
with it then lldb debugging will be pretty straight forward.

The [dotnet/diagnostics](https://github.com/dotnet/diagnostics) repo has more information:

Expand All @@ -45,10 +45,10 @@ CoreCLR also has some guidelines for specific Linux debugging scenarios:

Corrections:
- LLDB and createdump must be run as root
- `dotnet tool install -g dotnet-symbol` must be run from `$HOME`
- `dotnet tool install -g dotnet-symbol` must be run from `$HOME`

### Core Dumps
The CoreClr does not used the standard core dumping mechanisms on Linux. Instead you must specify via
The CoreClr does not used the standard core dumping mechanisms on Linux. Instead you must specify via
environment variables that you want a core dump to be produced. The simplest setup is to do the following:

```
Expand Down Expand Up @@ -79,12 +79,12 @@ indeed crashing in the GC.
Note: this variables can also be used on Windows as well.

## Ubuntu 18.04
The recommended OS for developing Roslyn is Ubuntu 18.04. This guide was written using Ubuntu 18.04 but should be
The recommended OS for developing Roslyn is Ubuntu 18.04. This guide was written using Ubuntu 18.04 but should be
applicable to most Linux environments. Ubuntu 18.04 was chosen here due to it's support for enhanced VMs in Hyper-V.
This makes it easier to use from a Windows machine: full screen, copy / paste, etc ...

### Hyper-V
Hyper-V has a builtin Ubuntu 18.04 image which supports enhanced mode. Here is a tutorial for creating
Hyper-V has a builtin Ubuntu 18.04 image which supports enhanced mode. Here is a tutorial for creating
such an image:

https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/quick-create-virtual-machine
Expand All @@ -93,10 +93,10 @@ When following this make sure to:
1. Click Installation Source and uncheck "Windows Secure Boot"
1. Complete the Ubuntu installation wizard. Full screen mode won't be available until this is done.

Overall this takes about 5-10 minutes to complete.
Overall this takes about 5-10 minutes to complete.

### Source Link
Many of the repositories that need to be built use source link and it crashes on Ubuntu 18.04 due to dependency changes.
Many of the repositories that need to be built use source link and it crashes on Ubuntu 18.04 due to dependency changes.
To disable source link add the following to the `Directory.Build.props` file in the root of the repository.

``` xml
Expand All @@ -109,6 +109,6 @@ To disable source link add the following to the `Directory.Build.props` file in
Make sure to install the following via `apt install`

- clang
- lldb
- lldb
- cmake
- xrdp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The minimal required version of .NET Framework is 4.7.2.
- Ensure Visual Studio is on Version "17.0" or greater
- Ensure "Use previews of the .NET Core SDK" is checked in Tools -> Options -> Environment -> Preview Features
- Restart Visual Studio
1. [.NET 6.0 RC 2 SDK](https://dotnet.microsoft.com/download/dotnet-core/6.0) [Windows x64 installer](https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-6.0.100-rc.2-windows-x64-installer)
1. [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/6.0) [Windows x64 installer](https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-6.0.100-windows-x64-installer)
1. [PowerShell 5.0 or newer](https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell). If you are on Windows 10, you are fine; you'll only need to upgrade if you're on earlier versions of Windows. The download link is under the ["Upgrading existing Windows PowerShell"](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-windows-powershell?view=powershell-6#upgrading-existing-windows-powershell) heading.
1. Run Restore.cmd
1. Open Roslyn.sln
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/Compiler Test Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ This document provides guidance for thinking about language interactions and tes
- Ref return, ref readonly return, ref ternary, ref readonly local, ref local re-assignment, ref foreach
- `this = e;` in `struct` .ctor
- Stackalloc (including initializers)
- Patterns (constant, declaration, `var`, positional, property and extended property, discard, parenthesized, type, relational, `and`/`or`/`not`)
- Patterns (constant, declaration, `var`, positional, property and extended property, discard, parenthesized, type, relational, `and`/`or`/`not`, list, slice)
- Switch expressions
- With expressions (on record classes and on value types)
- Nullability annotations (`?`, attributes) and analysis
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.21559.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.21569.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fecf65bedcee9036b8ba9d8d7feef5413f294914</Sha>
<Sha>97463777ee9a8445d4a4c5911ede0f0cd71fa8aa</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.1.0-1.21553.8">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.1.0-2.21574.9">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>4ba1d9d2984e212af9d6ebff95dedb8a3739c661</Sha>
<Sha>16333a806a64c3546faf0320063b66ff32936eaa</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="7.0.0-beta.21559.3">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="7.0.0-beta.21569.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fecf65bedcee9036b8ba9d8d7feef5413f294914</Sha>
<Sha>97463777ee9a8445d4a4c5911ede0f0cd71fa8aa</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
20 changes: 16 additions & 4 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<MajorVersion>4</MajorVersion>
<MinorVersion>1</MinorVersion>
<PatchVersion>0</PatchVersion>
<PreReleaseVersionLabel>2</PreReleaseVersionLabel>
<PreReleaseVersionLabel>3</PreReleaseVersionLabel>
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
<!--
By default the assembly version in official builds is "$(MajorVersion).$(MinorVersion).0.0".
Expand All @@ -23,7 +23,7 @@
</MajorVersion>
<MinorVersion>
</MinorVersion>
<MicrosoftNetCompilersToolsetVersion>4.1.0-1.21553.8</MicrosoftNetCompilersToolsetVersion>
<MicrosoftNetCompilersToolsetVersion>4.1.0-2.21574.9</MicrosoftNetCompilersToolsetVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Versions used by several individual references below -->
Expand Down Expand Up @@ -56,11 +56,11 @@
<BasicReferenceAssembliesNetStandard13Version>1.2.4</BasicReferenceAssembliesNetStandard13Version>
<BenchmarkDotNetVersion>0.13.0</BenchmarkDotNetVersion>
<BenchmarkDotNetDiagnosticsWindowsVersion>0.13.0</BenchmarkDotNetDiagnosticsWindowsVersion>
<DiffPlexVersion>1.4.4</DiffPlexVersion>
<DiffPlexVersion>1.5.0</DiffPlexVersion>
<FakeSignVersion>0.9.2</FakeSignVersion>
<HumanizerCoreVersion>2.2.0</HumanizerCoreVersion>
<ICSharpCodeDecompilerVersion>6.1.0.5902</ICSharpCodeDecompilerVersion>
<MicrosoftBuildLocatorVersion>1.2.6</MicrosoftBuildLocatorVersion>
<MicrosoftBuildLocatorVersion>1.4.1</MicrosoftBuildLocatorVersion>
<!--
SourceBuild will requires that all dependencies also be source buildable. We are referencing a
version of MSBuild that is not SourceBuild compatible, which makes our build incompatible. Since we only
Expand Down Expand Up @@ -124,6 +124,7 @@
<MicrosoftPortableTargetsVersion>0.1.2-dev</MicrosoftPortableTargetsVersion>
<MicrosoftServiceHubClientVersion>3.1.4</MicrosoftServiceHubClientVersion>
<MicrosoftServiceHubFrameworkVersion>3.1.4</MicrosoftServiceHubFrameworkVersion>
<MicrosoftSourceLinkToolsVersion>1.1.1-beta-21566-01</MicrosoftSourceLinkToolsVersion>
<MicrosoftVisualBasicVersion>10.1.0</MicrosoftVisualBasicVersion>
<MicrosoftVisualStudioCacheVersion>17.0.13-alpha</MicrosoftVisualStudioCacheVersion>
<MicrosoftVisualStudioCallHierarchyPackageDefinitionsVersion>15.8.27812-alpha</MicrosoftVisualStudioCallHierarchyPackageDefinitionsVersion>
Expand Down Expand Up @@ -202,6 +203,17 @@
<RoslynBuildUtilVersion>0.9.8-beta</RoslynBuildUtilVersion>
<RoslynDependenciesOptimizationDataVersion>3.0.0-beta2-19053-01</RoslynDependenciesOptimizationDataVersion>
<RoslynDiagnosticsAnalyzersVersion>$(RoslynDiagnosticsNugetPackageVersion)</RoslynDiagnosticsAnalyzersVersion>
<!--
The package "Microsoft.CodeAnalysis.Analyzer.Testing" brings in an earlier version of these NuGet dependencies than
is expected by the NET SDK used in the Workspace.MSBuild UnitTests. In order to test against the same verion of NuGet
as our configured SDK, we must set the version to be the same.
-->
<NuGetCommonVersion>6.0.0</NuGetCommonVersion>
<NuGetConfigurationVersion>$(NuGetCommonVersion)</NuGetConfigurationVersion>
<NuGetFrameworksVersion>$(NuGetCommonVersion)</NuGetFrameworksVersion>
<NuGetPackagingVersion>$(NuGetCommonVersion)</NuGetPackagingVersion>
<NuGetProtocolVersion>$(NuGetCommonVersion)</NuGetProtocolVersion>
<NuGetVersioningVersion>$(NuGetCommonVersion)</NuGetVersioningVersion>
<RoslynToolsVSIXExpInstallerVersion>1.1.0-beta3.21418.3</RoslynToolsVSIXExpInstallerVersion>
<RoslynMicrosoftVisualStudioExtensionManagerVersion>0.0.4</RoslynMicrosoftVisualStudioExtensionManagerVersion>
<SourceBrowserVersion>1.0.21</SourceBrowserVersion>
Expand Down
2 changes: 1 addition & 1 deletion eng/common/darc-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fi
function InstallDarcCli {
local darc_cli_package_name="microsoft.dotnet.darc"

InitializeDotNetCli
InitializeDotNetCli true
local dotnet_root=$_InitializeDotNetCli

if [ -z "$toolpath" ]; then
Expand Down
2 changes: 1 addition & 1 deletion eng/common/sdl/execute-all-sdl-tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ try {
Exec-BlockVerbosely {
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') `
-GuardianCliLocation $guardianCliLocation `
-WorkingDirectory $workingDirectory `
-WorkingDirectory $SourceDirectory `
-UpdateBaseline $UpdateBaseline `
-GdnFolder $gdnFolder
}
Expand Down
Loading

0 comments on commit 1c07b7f

Please sign in to comment.