Skip to content

Commit

Permalink
Merge pull request #43577 from gafter/covariant-returns-merge-2020-04-22
Browse files Browse the repository at this point in the history
Merge master to features/covariant-returns
  • Loading branch information
msftbot[bot] authored Apr 23, 2020
2 parents fbcd700 + 723440c commit e14df2f
Show file tree
Hide file tree
Showing 905 changed files with 41,038 additions and 28,318 deletions.
72 changes: 62 additions & 10 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,35 @@
"tasks": [
{
"label": "build",
"command": "./build.cmd",
"command": "./build.sh",
"type": "shell",
"args": [
],
"windows": {
"command": "./build.cmd",
},
"problemMatcher": "$msCompile",
"group": "build"
},
{
"label": "build skip analyzers",
"command": "./build.cmd",
"command": "./build.sh",
"type": "shell",
"args": [
"-skipAnalyzers"
"--skipAnalyzers"
],
"windows": {
"command": "./build.cmd",
"args": [
"-skipAnalyzers"
],
},
"problemMatcher": "$msCompile",
"group": "build"
},
{
"label": "build csc skip analyzers",
"command": "dotnet",
"command": "./.dotnet/dotnet",
"type": "shell",
"args": [
"msbuild",
Expand All @@ -36,17 +45,60 @@
"group": "build"
},
{
"label": "build directory skip analyzers",
"command": "dotnet",
"label": "build current project skip analyzers",
"command": "./.dotnet/dotnet",
"type": "shell",
"args": [
"msbuild",
"-p:UseRoslynAnalyzers=false",
"-p:GenerateFullPaths=true",
"${fileDirname}"
"pwsh",
"${workspaceRoot}/scripts/vscode-build.ps1",
"-filePath",
"${file}"
],
"problemMatcher": "$msCompile",
"group": "build"
},
{
"label": "generate compiler code",
"command": "./.dotnet/dotnet",
"type": "shell",
"args": [
"pwsh",
"${workspaceRoot}/eng/generate-compiler-code.ps1"
],
"problemMatcher": "$msCompile",
"group": "build"
},
{
"label": "run tests in current file (netcoreapp3.1)",
"command": "./.dotnet/dotnet",
"type": "shell",
"args": [
"pwsh",
"${workspaceRoot}/scripts/vscode-run-tests.ps1",
"-filePath",
"${file}",
"-framework",
"netcoreapp3.1",
"-filter",
"${fileBasenameNoExtension}"
],
"problemMatcher": "$msCompile",
"group": "test"
},
{
"label": "run tests in current project (netcoreapp3.1)",
"command": "./.dotnet/dotnet",
"type": "shell",
"args": [
"pwsh",
"${workspaceRoot}/scripts/vscode-run-tests.ps1",
"-filePath",
"${file}",
"-framework",
"netcoreapp3.1"
],
"problemMatcher": "$msCompile",
"group": "test"
}
]
}
1 change: 1 addition & 0 deletions docs/Language Feature Status.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ efforts behind them.
| [Covariant](https://github.com/dotnet/csharplang/issues/49) [Returns](https://github.com/dotnet/csharplang/issues/2844) | [features/covariant-returns](https://github.com/dotnet/roslyn/tree/features/covariant-returns) | [In Progress](https://github.com/dotnet/roslyn/issues/43188) | [gafter](https://github.com/gafter) | TBD,TBD | [gafter](https://github.com/gafter) |
| [Extension GetEnumerator](https://github.com/dotnet/csharplang/issues/3194) | [features/extension-foreach](https://github.com/dotnet/roslyn/tree/features/extension-foreach) | [In Progress](https://github.com/dotnet/roslyn/issues/43184) | [YairHalberstadt](https://github.com/YairHalberstadt) | [333fred](https://github.com/333fred) | [333fred](https://github.com/333fred) |
| [Module initializers](https://github.com/RikkiGibson/csharplang/blob/module-initializers/proposals/module-initializers.md) | TBD | [In progress / design](https://github.com/dotnet/roslyn/issues/40500) | [RikkiGibson](https://github.com/RikkiGibson) [jnm2](https://github.com/jnm2)| [AlekseyTs](https://github.com/AlekseyTs) | [gafter](https://github.com/gafter) |
| [Extending Partial](https://github.com/jaredpar/csharplang/blob/partial/proposals/extending-partial-methods.md) | [features/partial-methods](https://github.com/dotnet/roslyn/tree/features/partial-methods) | In-Progress | [RikkiGibson](https://github.com/RikkiGibson) | [chsienki](https://github.com/chsienki) | [jaredpar](https://github.com/jaredpar) |


# C# 8.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## API Review Notes for September 30th, 2019

### Changes reviewed
Starting commit: `38c90f8401f9e3ee5fb7c82aac36f6b85fdda979`

Ending Commit: `b8a5611e3db4f7ac3b5e1404b129304b5baf843e`

### Notes

IVariableDeclarationOperation:
- What does scripting do for using local declarations in IOperation?

Expand Down
27 changes: 27 additions & 0 deletions docs/compilers/API Notes/4-15-20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## API Review Notes for April 15th, 2020

### Changes reviewed
Starting commit: `c827247a767c0c434dcb77496038b163b9e011da`

Ending Commit: `3375a7b209d1f590940af043e9e39f2cbb503845`

### Notes

#### Everything but Source Generators:

* `Project.RemoveDocuments`: Everything else in this type uses `IEnumerable<T>`, not `ImmutableArray<T>`. If we could start again from day 1 we might make everything that, but given that everything today uses the former, we should do so here. This applies to the overloads on `Solution` as well.
* `Solution.RemoveAdditonalDocuments/RemoveAnalyzerConfigDocuments`: We added these to `Solution`, but not to project, even though that also has the invididual `Remove` methods. We should add them to `Project` as well.
* `DocumentOptionSet.GetOption`: This API was added as a `new` on the concrete `DocumentOptionSet` to cover a change when we moved the implementation up to `OptionSet` and made the method non-virtual. This is not actually a breaking change, so we should remove this.

#### Source Generators:

As a general note, changes that we make here are _not_ considered breaking changes post 16.6.
However, we did take a broad overview of the API surface and have some notes for @chsienki.

* `GeneratorAttribute`: we should consider adding a `LanguageName` attribute to this type.
* `InitializationContext`: Rename to something like `SourceGeneratorInitialzationContext` or similar. Current name is ambiguous.
* `InitializationContext.RegisterForNotifications`:
* Naming is inconsistent with existing `Action` ending for analyzer register methods.
* `SyntaxReceiverCreator`: all other `RegisterForXAction` methods in analyzers use an `Action` or `Func`, as appropriate. We should consider doing the same here.
* `ISyntaxReceiver`: This may be redundant with existing APIs.
* `SourceGeneratorContext`: There is not currently a way to share semantic models and other binding info between source generators. We should design a way for this info to be shared so we can avoid introducing lots of binding from generators.
21 changes: 0 additions & 21 deletions docs/compilers/Design/Notes/9-30-19.md

This file was deleted.

2 changes: 2 additions & 0 deletions docs/contributing/Compiler Test Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ __makeref( x )
- Interpolated string
- Tuple literal
- Tuple
- Default literal
- Implicit object creation (target-typed new)

## Types

Expand Down
7 changes: 3 additions & 4 deletions docs/contributing/Nullable Annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ struct SyntaxTrivia {
}
}
```
- **DO** use explicit validation such as `RoslynDebug.Assert` or
`Contract.ThrowIfNull` to validate state that is passed into the method if it
avoids the need for suppressions later in the method.
- **DO** use explicit validation such as `Debug.Assert` or
`Contract.ThrowIfNull` to capture internal program invariants.
```cs
void M1(SyntaxNode node) {
RoslynDebug.Assert(node.Parent is object);
Debug.Assert(node.Parent is object);
...
M2(node.Parent);
}
Expand Down
10 changes: 8 additions & 2 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
"isRoot": true,
"tools": {
"dotnet-format": {
"version": "3.2.107801",
"version": "3.3.111304",
"commands": [
"dotnet-format"
]
},
"powershell": {
"version": "7.0.0",
"commands": [
"pwsh"
]
}
}
}
}
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.20213.4">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.20215.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1a55276ab9d16792cec595ba870df39a9d97d5ca</Sha>
<Sha>36fd49bf87b14b78d722179b787e6518b5205518</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.7.0-1.20210.7">
<Uri>https://github.com/dotnet/roslyn</Uri>
Expand Down
75 changes: 3 additions & 72 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<PropertyGroup>
<!-- Versions used by several individual references below -->
<RoslynDiagnosticsNugetPackageVersion>3.0.0-beta2.20169.3</RoslynDiagnosticsNugetPackageVersion>
<CodeStyleLayerCodeAnalysisVersion>3.3.1</CodeStyleLayerCodeAnalysisVersion>
<CodeStyleLayerCodeAnalysisVersion>3.6.0-2.final</CodeStyleLayerCodeAnalysisVersion>
<MicrosoftCodeAnalysisTestingVersion>1.0.1-beta1.20210.2</MicrosoftCodeAnalysisTestingVersion>
<CodeStyleAnalyzerVersion>3.6.0-2.20157.5</CodeStyleAnalyzerVersion>
<CodeStyleAnalyzerVersion>3.7.0-1.20210.7</CodeStyleAnalyzerVersion>
<VisualStudioEditorPackagesVersion>16.4.248</VisualStudioEditorPackagesVersion>
<ILToolsPackageVersion>5.0.0-alpha1.19409.1</ILToolsPackageVersion>
<MicrosoftVisualStudioLanguageServerPackagesVersion>16.3.27-develop-gdd55e997</MicrosoftVisualStudioLanguageServerPackagesVersion>
Expand Down Expand Up @@ -214,7 +214,7 @@
<xunitVersion>2.4.1-pre.build.4059</xunitVersion>
<xunitanalyzersVersion>0.10.0</xunitanalyzersVersion>
<xunitassertVersion>$(xunitVersion)</xunitassertVersion>
<XunitCombinatorialVersion>1.2.7</XunitCombinatorialVersion>
<XunitCombinatorialVersion>1.3.2</XunitCombinatorialVersion>
<xunitextensibilitycoreVersion>$(xunitVersion)</xunitextensibilitycoreVersion>
<xunitrunnerconsoleVersion>2.4.1-pre.build.4059</xunitrunnerconsoleVersion>
<xunitrunnerwpfVersion>1.0.51</xunitrunnerwpfVersion>
Expand Down Expand Up @@ -245,75 +245,6 @@
<MicrosoftVisualStudioStaticReviewsEmbeddableVersion>0.1.102-alpha</MicrosoftVisualStudioStaticReviewsEmbeddableVersion>
<MicrosoftBclAsyncInterfacesVersion>1.1.0</MicrosoftBclAsyncInterfacesVersion>
</PropertyGroup>
<!--
The following packages are considered implementation details and will not be included
in the list of dependencies of Roslyn packages. They won't flow as package references
to the projects that reference Roslyn packages.
-->
<ItemGroup>
<PrivateVisualStudioPackage Include="EnvDTE" />
<PrivateVisualStudioPackage Include="EnvDTE80" />
<PrivateVisualStudioPackage Include="Microsoft.Internal.Performance.CodeMarkers.DesignTime" />
<PrivateVisualStudioPackage Include="Microsoft.Internal.VisualStudio.Shell.Interop.14.0.DesignTime" />
<PrivateVisualStudioPackage Include="Microsoft.MSXML" />
<PrivateVisualStudioPackage Include="Microsoft.ServiceHub.Client" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.CallHierarchy.Package.Definitions" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.ComponentModelHost" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.CodingConventions" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.CoreUtility" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Debugger.Engine-implementation" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Debugger.Metadata-implementation" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Debugger.UI.Interfaces" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Designer.Interfaces" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Editor" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.GraphModel" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.ImageCatalog" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Imaging" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Language.CallHierarchy" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Language.Intellisense" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Language.NavigateTo.Interfaces" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Language.StandardClassification" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.LanguageServer.Client" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.LiveShare.LanguageServices.Guest" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.LiveShare.WebEditors" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.OLE.Interop" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Progression.CodeSchema" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Progression.Common" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Progression.Interfaces" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.RemoteControl" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.15.0" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.Design" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.Framework" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.Immutable.10.0" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.Interop.9.0" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.Interop.10.0" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.Interop.11.0" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.Interop.12.1.DesignTime" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.Interop.14.0.DesignTime" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.Interop.15.0.DesignTime" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.Interop.15.3.DesignTime" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Shell.Interop.15.7.DesignTime" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Telemetry" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Text.Data" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Text.Logic" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Text.UI" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Text.UI.Wpf" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.TextManager.Interop.10.0" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.TextManager.Interop.12.0" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.TextManager.Interop.12.1.DesignTime" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.TextManager.Interop.16.0.DesignTime" />
<PrivateVisualStudioPackage Include="Microsoft.VisualStudio.Utilities" />
<PrivateVisualStudioPackage Include="Microsoft.VSSDK.BuildTools" />
<PrivateVisualStudioPackage Include="Newtonsoft.Json" />
<PrivateVisualStudioPackage Include="NuGet.VisualStudio" />
<PrivateVisualStudioPackage Include="StreamJsonRpc" />
<PrivateVisualStudioPackage Include="VSLangProj" />
<PrivateVisualStudioPackage Include="VSLangProj2" />
<PrivateVisualStudioPackage Include="VSLangProj80" />
<PrivateVisualStudioPackage Include="VSLangProj140" />
<PrivateVisualStudioPackage Include="VsWebsite.Interop" />
</ItemGroup>
<PropertyGroup>
<UsingToolPdbConverter>true</UsingToolPdbConverter>
<UsingToolSymbolUploader>true</UsingToolSymbolUploader>
Expand Down
37 changes: 32 additions & 5 deletions eng/build-utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function GetProjectOutputBinary([string]$fileName, [string]$projectName = "", [s

function GetPublishData() {
if (Test-Path variable:global:_PublishData) {
return $global:_PublishData
return $global:_PublishData
}

Write-Host "Downloading $PublishDataUrl"
Expand All @@ -38,19 +38,19 @@ function GetBranchPublishData([string]$branchName) {
$data = GetPublishData

if (Get-Member -InputObject $data.branches -Name $branchName) {
return $data.branches.$branchName
return $data.branches.$branchName
} else {
return $null
return $null
}
}

function GetReleasePublishData([string]$releaseName) {
$data = GetPublishData

if (Get-Member -InputObject $data.releases -Name $releaseName) {
return $data.releases.$releaseName
return $data.releases.$releaseName
} else {
return $null
return $null
}
}

Expand Down Expand Up @@ -173,6 +173,33 @@ function Ensure-DotnetSdk() {
throw "Could not find dotnet executable in $dotnetInstallDir"
}

# Walks up the source tree, starting at the given file's directory, and returns a FileInfo object for the first .csproj file it finds, if any.
function Get-ProjectFile([object]$fileInfo) {
Push-Location

Set-Location $fileInfo.Directory
try {
while ($true) {
# search up from the current file for a folder containing a csproj
$files = Get-ChildItem *.csproj
if ($files) {
return $files[0]
}
else {
$location = Get-Location
Set-Location ..
if ((Get-Location).Path -eq $location.Path) {
# our location didn't change. We must be at the drive root, so give up
return $null
}
}
}
}
finally {
Pop-Location
}
}

function Get-VersionCore([string]$name, [string]$versionFile) {
$name = $name.Replace(".", "")
$name = $name.Replace("-", "")
Expand Down
Loading

0 comments on commit e14df2f

Please sign in to comment.