Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Update dependencies from dotnet/arcade #6711

Merged
merged 10 commits into from
Aug 2, 2021

Conversation

dotnet-maestro[bot]
Copy link
Contributor

@dotnet-maestro dotnet-maestro bot commented Jul 26, 2021

This pull request updates the following dependencies

From https://github.com/dotnet/arcade

  • Subscription: 93d865d2-823f-4e4d-e0b6-08d91b0a84f2
  • Build: 20210729.2
  • Date Produced: 7/29/2021 7:20 PM
  • Commit: 62a8aafffd4c68ef887680f6837abdff906a662c
  • Branch: refs/heads/main

dotnet-maestro bot added 3 commits July 26, 2021 19:09
…720.12

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk
 From Version 6.0.0-beta.21365.11 -> To Version 6.0.0-beta.21370.12
…723.11

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk
 From Version 6.0.0-beta.21370.12 -> To Version 6.0.0-beta.21373.11
…726.4

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk
 From Version 6.0.0-beta.21365.11 -> To Version 6.0.0-beta.21376.4
Forgind and others added 4 commits July 27, 2021 15:11
The former isn't supported anymore, and the latter is wrong (at least in the running code—I didn't check the tests).
…727.2

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk
 From Version 6.0.0-beta.21369.3 -> To Version 6.0.0-beta.21377.2
…728.2

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk
 From Version 6.0.0-beta.21369.3 -> To Version 6.0.0-beta.21378.2
@Forgind
Copy link
Member

Forgind commented Jul 29, 2021

@ladipro (Are you still kitten?) Are we waiting for anything before merging this?

@@ -632,6 +632,7 @@ internal static bool IsMaxPathLegacyWindows()
}
}

#pragma warning disable CA1416
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing this, can you follow the guidance on this warning? https://docs.microsoft.com/en-us/dotnet/core/compatibility/code-analysis/5.0/ca1416-platform-compatibility-analyzer#recommended-action

Specifically, I'd expect to see this call annotated with [SupportedOSPlatform("windows")], which will require annotating or conditionalizing up the chain.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guidance I followed is right below the guidance you suggested.

Also, [SupportedOSPlatform("windows")] was introduced in .net 6, as was OperatingSystem.IsWindows(), so I would have to ifdef around the attribute or IsWindows check. That's pretty terrible, so I don't think that's a good idea.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the very least this needs a comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add one. It doesn't change anything, but I should correct myself: it was introduced in .net 5, not .net 6.

@@ -160,7 +159,6 @@ private AssemblyNameExtension(SerializationInfo info, StreamingContext context)
HashAlgorithm = hashAlgorithm,
VersionCompatibility = versionCompatibility,
CodeBase = codeBase,
KeyPair = keyPair
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still unclear on whether it's ok to make this change in the .NET Framework version of MSBuild where this API is available and works. Can you elaborate on your reasoning there?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssemblyNameExtension is internal, so customers can't use it without making a custom MSBuild. We don't rely on the KeyPair part because otherwise, the .net 6 code wouldn't run. So we don't need KeyPair, and customers can't need KeyPair, so we should be able to remove it and stop serializing/deserializing it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't rely on the KeyPair part because otherwise, the .net 6 code wouldn't run. So we don't need KeyPair

This doesn't obviously follow for me. I get that we don't need it on .NET 6+. But it's never used/compared in .NET Framework scenarios?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't say I took a deep look at every use, but I tried to briefly look at all our uses (outside tests) to see if they were #ifdef'd on platform, and the ones that were didn't seem to use StrongNameKeyPair. I was a little thrown by "GetPublicKeyToken" and wondered if that was a use, but it seems to still exist on .net 6 without throwing deprecated warnings, so I think it's something else. If you want me to, I can put the removal under an ifdef'd change wave or, if it makes you really uncomfortable, just ifdef it out, but then we may be serializing and deserializing something on .net framework for no reason.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think this is what I was looking for (from https://docs.microsoft.com/en-us/dotnet/api/system.reflection.assemblyname.keypair?view=net-5.0#remarks):

When the runtime loads an assembly, it does not set the KeyPair property. The getter for the property is only useful if the user set the property before using the AssemblyName object to create a dynamic assembly, and subsequently wants to retrieve the key pair.

Since we use this in RAR, which is not interested in dynamic assemblies, it will always be null, so dropping it is ok.

dotnet-maestro bot and others added 2 commits July 30, 2021 12:28
…729.2

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk
 From Version 6.0.0-beta.21369.3 -> To Version 6.0.0-beta.21379.2
@@ -160,7 +159,6 @@ private AssemblyNameExtension(SerializationInfo info, StreamingContext context)
HashAlgorithm = hashAlgorithm,
VersionCompatibility = versionCompatibility,
CodeBase = codeBase,
KeyPair = keyPair
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think this is what I was looking for (from https://docs.microsoft.com/en-us/dotnet/api/system.reflection.assemblyname.keypair?view=net-5.0#remarks):

When the runtime loads an assembly, it does not set the KeyPair property. The getter for the property is only useful if the user set the property before using the AssemblyName object to create a dynamic assembly, and subsequently wants to retrieve the key pair.

Since we use this in RAR, which is not interested in dynamic assemblies, it will always be null, so dropping it is ok.

@Forgind Forgind added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Aug 2, 2021
@rokonec rokonec merged commit aaac00a into main Aug 2, 2021
@rokonec rokonec deleted the darc-main-d484a0e6-ddaa-44fe-8415-92626fffb0b0 branch August 2, 2021 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants