Skip to content

Commit

Permalink
[release/6.0.1xx-rc2] Update dependencies from dotnet/roslyn (#21287)
Browse files Browse the repository at this point in the history
[release/6.0.1xx-rc2] Update dependencies from dotnet/roslyn


 - Fix It_resolves_analyzers_targeting_mulitple_roslyn_versions test

The latest Roslyn sets CompilerApiVersion which is overriding the values placed in the project in this test. Use a command line property instead to override Roslyn's targets file.
  • Loading branch information
dotnet-maestro[bot] authored Sep 28, 2021
1 parent 88d4617 commit 54cf978
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
20 changes: 10 additions & 10 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,26 @@
<Uri>https://github.com/dotnet/format</Uri>
<Sha>9ff1db40a091b26e598f8d7ffab96430e81d9efb</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.0.0-5.21471.19">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.0.0-5.21477.12">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>2cb3d482e3c09760d1b204c597be93f49dba3349</Sha>
<Sha>ea8b7316adb82d7b2ab9ab570d4ae100019f6a6e</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.0.0-5.21471.19">
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.0.0-5.21477.12">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>2cb3d482e3c09760d1b204c597be93f49dba3349</Sha>
<Sha>ea8b7316adb82d7b2ab9ab570d4ae100019f6a6e</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="4.0.0-5.21471.19">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Features" Version="4.0.0-5.21477.12">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>2cb3d482e3c09760d1b204c597be93f49dba3349</Sha>
<Sha>ea8b7316adb82d7b2ab9ab570d4ae100019f6a6e</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.0-5.21471.19">
<Dependency Name="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.0-5.21477.12">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>2cb3d482e3c09760d1b204c597be93f49dba3349</Sha>
<Sha>ea8b7316adb82d7b2ab9ab570d4ae100019f6a6e</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.0.0-5.21471.19">
<Dependency Name="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.0.0-5.21477.12">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>2cb3d482e3c09760d1b204c597be93f49dba3349</Sha>
<Sha>ea8b7316adb82d7b2ab9ab570d4ae100019f6a6e</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.DeveloperCertificates.XPlat" Version="6.0.0-rc.2.21470.37">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
Expand Down
10 changes: 5 additions & 5 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/roslyn -->
<MicrosoftNetCompilersToolsetPackageVersion>4.0.0-5.21471.19</MicrosoftNetCompilersToolsetPackageVersion>
<MicrosoftNetCompilersToolsetPackageVersion>4.0.0-5.21477.12</MicrosoftNetCompilersToolsetPackageVersion>
<MicrosoftCodeAnalysisPackageVersion>4.0.0-4.21412.9</MicrosoftCodeAnalysisPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>4.0.0-5.21471.19</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>4.0.0-5.21471.19</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>4.0.0-5.21471.19</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>4.0.0-5.21471.19</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
<MicrosoftCodeAnalysisCSharpPackageVersion>4.0.0-5.21477.12</MicrosoftCodeAnalysisCSharpPackageVersion>
<MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>4.0.0-5.21477.12</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>4.0.0-5.21477.12</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>4.0.0-5.21477.12</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/aspnet/AspNetCore -->
Expand Down
13 changes: 5 additions & 8 deletions src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void It_does_not_warn_on_rid_with_self_contained_options_prior_to_net6()
[Theory]
[InlineData("roslyn3.9")]
[InlineData("roslyn4.0")]
public void It_resolves_analyzers_tareting_mulitple_roslyn_versions(string compilerApiVersion)
public void It_resolves_analyzers_targeting_mulitple_roslyn_versions(string compilerApiVersion)
{
var testProject = new TestProject()
{
Expand All @@ -241,13 +241,6 @@ public void It_resolves_analyzers_tareting_mulitple_roslyn_versions(string compi

testProject.ProjectChanges.Add(project =>
{
var propertyGroup = XElement.Parse($@"
<PropertyGroup>
<CompilerApiVersion>{compilerApiVersion}</CompilerApiVersion>
</PropertyGroup>");
project.Root.Add(propertyGroup);
var itemGroup = XElement.Parse(@"
<ItemGroup>
<PackageReference Include=""Library.ContainsAnalyzer"" Version=""1.0.0"" />
Expand All @@ -265,6 +258,10 @@ public void It_resolves_analyzers_tareting_mulitple_roslyn_versions(string compi
"Analyzer",
GetValuesCommand.ValueType.Item);

// set the CompilerApiVersion through a command line property to override any value brought in by
// the CodeAnalysis targets.
command.Properties.Add("CompilerApiVersion", compilerApiVersion);

command.Execute().Should().Pass();

var analyzers = command.GetValues();
Expand Down

0 comments on commit 54cf978

Please sign in to comment.