Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into merge-master
Browse files Browse the repository at this point in the history
* upstream/master: (148 commits)
  Remove unnecessary ArrayBuilder in MakeCallWithNoExplicitArgument (dotnet#49377)
  Revert "Skip binary for determinism checking"
  Use deterministic metadata names for emitted anonymous type fields. (dotnet#49370)
  Reuse LSP solutions if they don't need re-forking (dotnet#49305)
  Small nullability fixes (dotnet#49279)
  Create default arguments during binding (dotnet#49186)
  Clean nits
  Backport dotnet#48420 to release/dev16.8 (dotnet#49357)
  Rewrite AnalyzeFileReference.GetSupportedLanguages without LINQ (dotnet#49337)
  Use .Any extension of ImmutableArray(Of Symbol) (dotnet#48980)
  fix 'remove unnecessary cast' when doing bitwise ops on unsigned values.
  Harden, document, cross-link XunitDisposeHook
  Simplify x86 hook
  Fix split comment exporting for VB.
  Code style fix
  Overwrite xunit's app domain handling to not call AppDomain.Unload
  Revert pragma suppression
  Remove blank line
  Revert file
  Move block structure code back to Features layer
  ...
  • Loading branch information
333fred committed Nov 16, 2020
2 parents 103f91a + 99ad990 commit 037c07d
Show file tree
Hide file tree
Showing 736 changed files with 20,214 additions and 14,895 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@ csharp_prefer_braces = true:silent
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true

# warning RS0037: PublicAPI.txt is missing '#nullable enable'
dotnet_diagnostic.RS0037.severity = none

[src/CodeStyle/**.{cs,vb}]
# warning RS0005: Do not use generic CodeAction.Create to create CodeAction
dotnet_diagnostic.RS0005.severity = none
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"type": "shell",
"args": [
"msbuild",
"-p:UseRoslynAnalyzers=false",
"-p:RunAnalyzersDuringBuild=false",
"-p:GenerateFullPaths=true",
"src/Compilers/CSharp/csc/csc.csproj"
],
Expand Down
8 changes: 4 additions & 4 deletions Compilers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,10 @@ Global
{288089C5-8721-458E-BE3E-78990DAB5E2E}.Debug|Any CPU.Build.0 = Debug|x64
{288089C5-8721-458E-BE3E-78990DAB5E2E}.Release|Any CPU.ActiveCfg = Release|x64
{288089C5-8721-458E-BE3E-78990DAB5E2E}.Release|Any CPU.Build.0 = Release|x64
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Debug|Any CPU.ActiveCfg = Debug|x64
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Debug|Any CPU.Build.0 = Debug|x64
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Release|Any CPU.ActiveCfg = Release|x64
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Release|Any CPU.Build.0 = Release|x64
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Release|Any CPU.Build.0 = Release|Any CPU
{D0A79850-B32A-45E5-9FD5-D43CB345867A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0A79850-B32A-45E5-9FD5-D43CB345867A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0A79850-B32A-45E5-9FD5-D43CB345867A}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
22 changes: 18 additions & 4 deletions Roslyn.sln
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Edit
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Test.Utilities", "src\Compilers\Test\Core\Microsoft.CodeAnalysis.Test.Utilities.csproj", "{5D94ED65-EFA3-44EB-A5DA-62E85BAC9DD6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.TestSourceGenerator", "src\Workspaces\TestSourceGenerator\Microsoft.CodeAnalysis.TestSourceGenerator.csproj", "{21B50E65-D601-4D82-B98A-FFE6DE3B25DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.XunitHook", "src\EditorFeatures\XunitHook\Microsoft.CodeAnalysis.XunitHook.csproj", "{967A8F5E-7D18-436C-97ED-1DB303FE5DE0}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\Analyzers\VisualBasic\CodeFixes\VisualBasicCodeFixes.projitems*{0141285d-8f6c-42c7-baf3-3c0ccd61c716}*SharedItemsImports = 5
Expand Down Expand Up @@ -662,10 +666,10 @@ Global
{288089C5-8721-458E-BE3E-78990DAB5E2E}.Debug|Any CPU.Build.0 = Debug|x64
{288089C5-8721-458E-BE3E-78990DAB5E2E}.Release|Any CPU.ActiveCfg = Release|x64
{288089C5-8721-458E-BE3E-78990DAB5E2E}.Release|Any CPU.Build.0 = Release|x64
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Debug|Any CPU.ActiveCfg = Debug|x64
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Debug|Any CPU.Build.0 = Debug|x64
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Release|Any CPU.ActiveCfg = Release|x64
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Release|Any CPU.Build.0 = Release|x64
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{288089C5-8721-458E-BE3E-78990DAB5E2D}.Release|Any CPU.Build.0 = Release|Any CPU
{6AA96934-D6B7-4CC8-990D-DB6B9DD56E34}.Debug|Any CPU.ActiveCfg = Debug|x64
{6AA96934-D6B7-4CC8-990D-DB6B9DD56E34}.Debug|Any CPU.Build.0 = Debug|x64
{6AA96934-D6B7-4CC8-990D-DB6B9DD56E34}.Release|Any CPU.ActiveCfg = Release|x64
Expand Down Expand Up @@ -1230,6 +1234,14 @@ Global
{5D94ED65-EFA3-44EB-A5DA-62E85BAC9DD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D94ED65-EFA3-44EB-A5DA-62E85BAC9DD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D94ED65-EFA3-44EB-A5DA-62E85BAC9DD6}.Release|Any CPU.Build.0 = Release|Any CPU
{21B50E65-D601-4D82-B98A-FFE6DE3B25DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{21B50E65-D601-4D82-B98A-FFE6DE3B25DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21B50E65-D601-4D82-B98A-FFE6DE3B25DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21B50E65-D601-4D82-B98A-FFE6DE3B25DC}.Release|Any CPU.Build.0 = Release|Any CPU
{967A8F5E-7D18-436C-97ED-1DB303FE5DE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{967A8F5E-7D18-436C-97ED-1DB303FE5DE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{967A8F5E-7D18-436C-97ED-1DB303FE5DE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{967A8F5E-7D18-436C-97ED-1DB303FE5DE0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1447,6 +1459,8 @@ Global
{9B25E472-DF94-4E24-9F5D-E487CE5A91FB} = {FD0FAF5F-1DED-485C-99FA-84B97F3A8EEC}
{67F44564-759B-4643-BD86-407B010B0B74} = {EE97CB90-33BB-4F3A-9B3D-69375DEC6AC6}
{5D94ED65-EFA3-44EB-A5DA-62E85BAC9DD6} = {A41D1B99-F489-4C43-BBDF-96D61B19A6B9}
{21B50E65-D601-4D82-B98A-FFE6DE3B25DC} = {55A62CFA-1155-46F1-ADF3-BEEE51B58AB5}
{967A8F5E-7D18-436C-97ED-1DB303FE5DE0} = {EE97CB90-33BB-4F3A-9B3D-69375DEC6AC6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {604E6B91-7BC0-4126-AE07-D4D2FEFC3D29}
Expand Down
16 changes: 10 additions & 6 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@
<!-- Versions used by several individual references below -->
<RoslynDiagnosticsNugetPackageVersion>3.3.2-beta1.20528.2</RoslynDiagnosticsNugetPackageVersion>
<MicrosoftCodeAnalysisNetAnalyzersVersion>5.0.0-rc2.20453.1</MicrosoftCodeAnalysisNetAnalyzersVersion>
<CodeStyleLayerCodeAnalysisVersion>3.7.0</CodeStyleLayerCodeAnalysisVersion>
<MicrosoftCodeAnalysisTestingVersion>1.0.1-beta1.20407.3</MicrosoftCodeAnalysisTestingVersion>
<CodeStyleAnalyzerVersion>3.8.0-2.20414.4</CodeStyleAnalyzerVersion>
<VisualStudioEditorPackagesVersion>16.8.181</VisualStudioEditorPackagesVersion>
<ILToolsPackageVersion>5.0.0-alpha1.19409.1</ILToolsPackageVersion>
<MicrosoftVisualStudioLanguageServerProtocolPackagesVersion>16.9.43</MicrosoftVisualStudioLanguageServerProtocolPackagesVersion>
<MicrosoftVisualStudioShellPackagesVersion>16.8.30406.65-pre</MicrosoftVisualStudioShellPackagesVersion>
<!-- The version of Roslyn we build Source Generators against that are built in this
repository. This must be lower than MicrosoftNetCompilersToolsetVersion,
but not higher than our minimum dogfoodable Visual Studio version, or else
the generators we build would load on the command line but not load in IDEs. -->
<SourceGeneratorMicrosoftCodeAnalysisVersion>3.8.0-3.final</SourceGeneratorMicrosoftCodeAnalysisVersion>
</PropertyGroup>
<!--
Dependency versions
Expand Down Expand Up @@ -173,10 +177,10 @@
<MicrosoftVisualStudioTextManagerInterop120Version>12.0.30110</MicrosoftVisualStudioTextManagerInterop120Version>
<MicrosoftVisualStudioTextManagerInterop121DesignTimeVersion>12.1.30328</MicrosoftVisualStudioTextManagerInterop121DesignTimeVersion>
<MicrosoftVisualStudioTextManagerInterop160DesignTimeVersion>16.0.0</MicrosoftVisualStudioTextManagerInterop160DesignTimeVersion>
<MicrosoftVisualStudioThreadingAnalyzersVersion>16.8.7-alpha</MicrosoftVisualStudioThreadingAnalyzersVersion>
<MicrosoftVisualStudioThreadingVersion>16.8.7-alpha</MicrosoftVisualStudioThreadingVersion>
<MicrosoftVisualStudioThreadingAnalyzersVersion>16.8.55</MicrosoftVisualStudioThreadingAnalyzersVersion>
<MicrosoftVisualStudioThreadingVersion>16.8.55</MicrosoftVisualStudioThreadingVersion>
<MicrosoftVisualStudioUtilitiesVersion>$(MicrosoftVisualStudioShellPackagesVersion)</MicrosoftVisualStudioUtilitiesVersion>
<MicrosoftVisualStudioValidationVersion>16.8.2-alpha</MicrosoftVisualStudioValidationVersion>
<MicrosoftVisualStudioValidationVersion>16.8.33</MicrosoftVisualStudioValidationVersion>
<MicrosoftVisualStudioVsInteractiveWindowVersion>2.8.0</MicrosoftVisualStudioVsInteractiveWindowVersion>
<MicrosoftVisualStudioWorkspaceVSIntegrationVersion>16.3.43</MicrosoftVisualStudioWorkspaceVSIntegrationVersion>
<MicrosoftWin32PrimitivesVersion>4.3.0</MicrosoftWin32PrimitivesVersion>
Expand Down Expand Up @@ -249,8 +253,8 @@
-->
<NewtonsoftJsonVersion>12.0.2</NewtonsoftJsonVersion>
<StreamJsonRpcVersion>2.6.104</StreamJsonRpcVersion>
<SystemCollectionsImmutableVersion>5.0.0-preview.8.20407.11</SystemCollectionsImmutableVersion>
<SystemReflectionMetadataVersion>5.0.0-preview.8.20407.11</SystemReflectionMetadataVersion>
<SystemCollectionsImmutableVersion>5.0.0</SystemCollectionsImmutableVersion>
<SystemReflectionMetadataVersion>5.0.0</SystemReflectionMetadataVersion>
<MicrosoftBclAsyncInterfacesVersion>1.1.1</MicrosoftBclAsyncInterfacesVersion>
</PropertyGroup>
<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions eng/build-utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function Run-MSBuild([string]$projectFilePath, [string]$buildArgs = "", [string]
}

if ($runAnalyzers) {
$args += " /p:UseRoslynAnalyzers=true"
$args += " /p:RunAnalyzersDuringBuild=true"
}

if ($binaryLog) {
Expand Down Expand Up @@ -331,7 +331,7 @@ function Make-BootstrapBuild([switch]$force32 = $false) {
$projectPath = "src\NuGet\$packageName\$packageName.Package.csproj"
$force32Flag = if ($force32) { " /p:BOOTSTRAP32=true" } else { "" }

Run-MSBuild $projectPath "/restore /t:Pack /p:RoslynEnforceCodeStyle=false /p:UseRoslynAnalyzers=false /p:DotNetUseShippingVersions=true /p:InitialDefineConstants=BOOTSTRAP /p:PackageOutputPath=`"$dir`" /p:EnableNgenOptimization=false /p:PublishWindowsPdb=false $force32Flag" -logFileName "Bootstrap" -configuration $bootstrapConfiguration -runAnalyzers
Run-MSBuild $projectPath "/restore /t:Pack /p:RoslynEnforceCodeStyle=false /p:RunAnalyzersDuringBuild=false /p:DotNetUseShippingVersions=true /p:InitialDefineConstants=BOOTSTRAP /p:PackageOutputPath=`"$dir`" /p:EnableNgenOptimization=false /p:PublishWindowsPdb=false $force32Flag" -logFileName "Bootstrap" -configuration $bootstrapConfiguration -runAnalyzers
$packageFile = Get-ChildItem -Path $dir -Filter "$packageName.*.nupkg"
Unzip "$dir\$packageFile" $dir

Expand Down
2 changes: 1 addition & 1 deletion eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function BuildSolution() {
/p:Publish=$publish `
/p:ContinuousIntegrationBuild=$ci `
/p:OfficialBuildId=$officialBuildId `
/p:UseRoslynAnalyzers=$runAnalyzers `
/p:RunAnalyzersDuringBuild=$runAnalyzers `
/p:BootstrapBuildPath=$bootstrapDir `
/p:TestTargetFrameworks=$testTargetFrameworks `
/p:TreatWarningsAsErrors=$warnAsError `
Expand Down
11 changes: 3 additions & 8 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,9 @@ function BuildSolution {
bl="/bl:\"$log_dir/Build.binlog\""
fi

local projects="$repo_root/$solution"

# https://github.com/dotnet/roslyn/issues/23736
UNAME="$(uname)"
if [[ "$UNAME" == "Darwin" ]]; then
run_analyzers=false
fi
local projects="$repo_root/$solution"

UNAME="$(uname)"
# NuGet often exceeds the limit of open files on Mac and Linux
# https://github.com/NuGet/Home/issues/2163
if [[ "$UNAME" == "Darwin" || "$UNAME" == "Linux" ]]; then
Expand Down Expand Up @@ -285,7 +280,7 @@ function BuildSolution {
/p:Test=$test \
/p:Pack=$pack \
/p:Publish=$publish \
/p:UseRoslynAnalyzers=$run_analyzers \
/p:RunAnalyzersDuringBuild=$run_analyzers \
/p:BootstrapBuildPath="$bootstrap_dir" \
/p:ContinuousIntegrationBuild=$ci \
/p:TreatWarningsAsErrors=true \
Expand Down
2 changes: 2 additions & 0 deletions eng/config/globalconfigs/Common.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ dotnet_diagnostic.RS0024.severity = error
dotnet_diagnostic.RS0025.severity = error
dotnet_diagnostic.RS0026.severity = error
dotnet_diagnostic.RS0027.severity = error
# RS0037: PublicAPI.txt is missing '#nullable enable'
dotnet_diagnostic.RS0037.severity = none
# RS0040: Defaultable types should have defaultable fields
dotnet_diagnostic.RS0040.severity = none
# RS0046: Avoid the 'Opt' suffix in nullable-enabled code (too noisy right now)
Expand Down
8 changes: 6 additions & 2 deletions eng/generate-compiler-code.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $ErrorActionPreference="Stop"
function Run-Tool($projectFilePath, $toolArgs) {
$toolName = Split-Path -leaf $projectFilePath
Write-Host "Running $toolName $toolArgs"
Exec-Console $dotnet "run -p $projectFilePath $toolArgs"
Exec-Console $dotnet "run -p $projectFilePath --framework netcoreapp3.1 $toolArgs"
}

function Run-LanguageCore($language, $languageSuffix, $languageDir, $syntaxProject, $errorFactsProject, $generatedDir, $generatedTestDir) {
Expand All @@ -25,7 +25,11 @@ function Run-LanguageCore($language, $languageSuffix, $languageDir, $syntaxProje

Create-Directory $generatedDir
Create-Directory $generatedTestDir
Run-Tool $syntaxProject "`"$syntaxFilePath`" `"$generatedDir`""

# The C# syntax is now generated by a source generator
if ($language -ne "CSharp") {
Run-Tool $syntaxProject "`"$syntaxFilePath`" `"$generatedDir`""
}
Run-Tool $syntaxProject "`"$syntaxFilePath`" `"$generatedDir`" /grammar"
Run-Tool $syntaxProject "`"$syntaxFilePath`" `"$syntaxTestFilePath`" /test"
Run-Tool $boundTreeGenProject "$language `"$boundFilePath`" `"$boundGeneratedFilePath`""
Expand Down
21 changes: 5 additions & 16 deletions eng/targets/Imports.targets
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
</PropertyGroup>

<!--
PERF: Set default value for 'UseRoslynAnalyzers' to determine if analyzers should be executed.
PERF: Set default value for 'RunAnalyzersDuringBuild' to determine if analyzers should be executed.
Default to 'false' in all non-CI builds to improve local build time (i.e. csc/vbc invocations both inside Visual Studio and from command line prompt), except if:
1. We are enforcing code style, i.e. '$(RoslynEnforceCodeStyle)' == 'true' OR
2. We are explicitly running code analysis via "Run Code Analysis" command, i.e. '$(RunCodeAnalysis)' == 'true'.
Otherwise, default to 'true'.
-->
<PropertyGroup Condition="'$(UseRoslynAnalyzers)' == ''">
<UseRoslynAnalyzers Condition="'$(DesignTimeBuild)' != 'true' AND '$(ContinuousIntegrationBuild)' != 'true' AND !('$(RoslynEnforceCodeStyle)' == 'true' OR '$(RunCodeAnalysis)' == 'true')">false</UseRoslynAnalyzers>
<UseRoslynAnalyzers Condition="'$(UseRoslynAnalyzers)' == ''">true</UseRoslynAnalyzers>
<PropertyGroup Condition="'$(RunAnalyzersDuringBuild)' == ''">
<RunAnalyzersDuringBuild Condition="'$(DesignTimeBuild)' != 'true' AND '$(ContinuousIntegrationBuild)' != 'true' AND !('$(RoslynEnforceCodeStyle)' == 'true' OR '$(RunCodeAnalysis)' == 'true')">false</RunAnalyzersDuringBuild>
<RunAnalyzersDuringBuild Condition="'$(RunAnalyzersDuringBuild)' == ''">true</RunAnalyzersDuringBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(DisableNullableWarnings)' == 'true'">
Expand Down Expand Up @@ -168,24 +168,13 @@
Condition="$(_VersionComparisonResult) &lt; 0"/>
</Target>

<Target Name="DisableAnalyzers"
BeforeTargets="CoreCompile"
Condition="'$(UseRoslynAnalyzers)' == 'false'">
<!--
Disable analyzers via an MSBuild property settable on the command line.
-->
<ItemGroup>
<Analyzer Remove="@(Analyzer)" />
</ItemGroup>
</Target>

<!--
Work around missing code fix references causing VBCSCompiler.exe to reject compilations.
https://github.com/dotnet/roslyn/issues/46684
-->
<Target Name="ExcludeCodeFixes"
BeforeTargets="CoreCompile"
Condition="'$(UseRoslynAnalyzers)' != 'false' AND '$(BuildingProject)' == 'true'">
Condition="'$(BuildingProject)' == 'true'">
<!--
Disable analyzers that only provide code fixes.
-->
Expand Down
5 changes: 5 additions & 0 deletions eng/targets/Settings.props
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@
<PackageReference Include="Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers" Version="$(MicrosoftCodeAnalysisPerformanceSensitiveAnalyzersVersion)" PrivateAssets="all" />
</ItemGroup>

<!-- Disable SDK supplied netanalyzers as we reference them from nugets instead -->
<PropertyGroup>
<EnableNetAnalyzers>false</EnableNetAnalyzers>
</PropertyGroup>

<!--
Code indexing targets to help generating LSIF from indexing builds.
-->
Expand Down
5 changes: 1 addition & 4 deletions eng/test-determinism.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ if ($help) {

# List of binary names that should be skipped because they have a known issue that
# makes them non-deterministic.
$script:skipList = @(
# Added to work around https://github.com/dotnet/roslyn/issues/48417
"Microsoft.CodeAnalysis.EditorFeatures2.UnitTests.dll"
)
$script:skipList = @()

function Run-Build([string]$rootDir, [string]$logFileName) {
# Clean out the previous run
Expand Down
2 changes: 1 addition & 1 deletion scripts/vscode-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $projectFileInfo = Get-ProjectFile $fileInfo
if ($projectFileInfo) {
$buildTool = InitializeBuildTool
$frameworkArg = if ($framework -ne "") { " -p:TargetFramework=$framework" } else { "" }
$buildArgs = "$($buildTool.Command) -v:m -m -p:UseRoslynAnalyzers=false -p:GenerateFullPaths=true$frameworkArg $($projectFileInfo.FullName)"
$buildArgs = "$($buildTool.Command) -v:m -m -p:RunAnalyzersDuringBuild=false -p:GenerateFullPaths=true$frameworkArg $($projectFileInfo.FullName)"

Write-Host "$($buildTool.Path) $buildArgs"
Exec-Console $buildTool.Path $buildArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,34 @@ protected override bool AreObjectInitializersSupported(SyntaxNodeAnalysisContext
}

protected override ISyntaxFacts GetSyntaxFacts() => CSharpSyntaxFacts.Instance;

protected override bool IsValidContainingStatement(StatementSyntax node)
{
// We don't want to offer this for using declarations because the way they are lifted means all
// initialization is done before entering try block. For example
//
// using var c = new Disposable() { Goo = 2 };
//
// is lowered to:
//
// var __c = new Disposable();
// __c.Goo = 2;
// var c = __c;
// try
// {
// }
// finally
// {
// if (c != null)
// {
// ((IDisposable)c).Dispose();
// }
// }
//
// As can be seen, if initializing throws any kind of exception, the newly created instance will not
// be disposed properly.
return node is not LocalDeclarationStatementSyntax localDecl ||
localDecl.UsingKeyword == default;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<target state="translated">"typeof" kann in "nameof" konvertiert werden.</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<target state="translated">"typeof" puede convertirse en "nameof"</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<target state="translated">'typeof' peut être converti en 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
</trans-unit>
<trans-unit id="typeof_can_be_converted_ to_nameof">
<source>'typeof' can be converted to 'nameof'</source>
<target state="new">'typeof' can be converted to 'nameof'</target>
<target state="translated">'typeof' può essere convertito in 'nameof'</target>
<note />
</trans-unit>
<trans-unit id="use_var_instead_of_explicit_type">
Expand Down
Loading

0 comments on commit 037c07d

Please sign in to comment.