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/runtime #18292

Merged
merged 5 commits into from
Jun 17, 2021

Conversation

dotnet-maestro[bot]
Copy link
Contributor

@dotnet-maestro dotnet-maestro bot commented Jun 16, 2021

This pull request updates the following dependencies

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

  • Subscription: aa69f164-2492-460a-3914-08d8e9750bf8
  • Build: 20210617.1
  • Date Produced: 6/17/2021 10:11 AM
  • Commit: 96a4671bc52e70024da409f5f48b0abaa30cb901
  • Branch: refs/heads/main

…0616.2

Microsoft.NETCore.Platforms , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NET.HostModel , Microsoft.Extensions.DependencyModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , System.CodeDom , VS.Redist.Common.NetCore.SharedFramework.x64.6.0
 From Version 6.0.0-preview.6.21314.2 -> To Version 6.0.0-preview.7.21316.2
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-maestro
Copy link
Contributor Author

Notification for subscribed users from https://github.com/dotnet/runtime:

@dnr-codeflow

Action requested: Please take a look at this failing automated dependency-flow pull request's checks; failures may be related to changes which originated in your repo.

  • This pull request contains changes from your source repo (https://github.com/dotnet/runtime) and seems to have failed checks in this PR. Please take a peek at the failures and comment if they seem relevant to your changes.
  • If you're being tagged in this comment it is due to an entry in the related Maestro Subscription of the Build Asset Registry. If you feel this entry has added your GitHub login or your GitHub team in error, please update the subscription to reflect this.
  • For more details, please read the Arcade Darc documentation

@danmoseley
Copy link
Member

@dsplaisted @sfoslund who is domestic cat this week? (could we set up @sdk/domestic-cat so I can just use that?)

there is response needed in CLI:

❌[Log] src\Cli\Microsoft.DotNet.Cli.Utils\WindowsRegistryEnvironmentPathEditor.cs(30,55): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'RegistryValueKind.ExpandString' is only supported on: 'windows'.
❌[Log] src\Cli\Microsoft.DotNet.Cli.Utils\Windows.cs(23,39): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'WindowsBuiltInRole.Administrator' is only supported on: 'windows'.
❌[Log] src\Cli\Microsoft.DotNet.Cli.Utils\WindowsRegistryEnvironmentPathEditor.cs(22,59): error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'RegistryValueOptions.DoNotExpandEnvironmentNames' is only supported on: 'windows'.

@danmoseley
Copy link
Member

@jeffhandley is there someone who can help the CLI team resolve these analyzer violations? to unblock codeflow.

@dsplaisted
Copy link
Member

@joeloff

@joeloff
Copy link
Member

joeloff commented Jun 16, 2021

Hmm, is this a new check. The code's been around, but it looks like we probably need to add SupportOsPlatform attributes to this class

@joeloff
Copy link
Member

joeloff commented Jun 16, 2021

@jeffhandley I would expect SupportedOSPlatform to work, but it does not. Has anything changed recently in the analyzers?

@danmoseley
Copy link
Member

@buyaa-n

@jeffhandley
Copy link
Member

jeffhandley commented Jun 16, 2021

We recently updated the CA1416 analyzer with dotnet/roslyn-analyzers#5117 to improve scenarios related to platform-neutral assemblies. I can't think of anything in there that could have caused this though.

It's also possible that some of the recent changes around netstandard vs. netcoreapp could have surfaced something new here. dotnet/runtime#53023

Looking...

@buyaa-n
Copy link
Contributor

buyaa-n commented Jun 16, 2021

I can't think of anything in there that could have caused this though.

Yes, that change should not reveal any warning for these PR changes. T

Has anything changed recently in the analyzers?

The warnings look valid and any recent change should cause this. No idea why they showed up now.

I would expect SupportedOSPlatform to work, but it does not.

Seems it worked for the APIs you added but needs SupportedOSPlatform("windows") in more places, probably add an assembly-level attribute for windows targeted build

EDIT: I see they are failed in Ubuntu build too, so assembly-level attribute for windows targeted build seems would not help, probably need to add an annotation for each APIs referencing windows only APIs (or add platform check if they are reachable in cross-platform build)

@jeffhandley
Copy link
Member

I'm starting to suspect this change as what triggered this: dotnet/runtime@663c40d (dotnet/runtime#54147)

@jeffhandley
Copy link
Member

Indeed, dotnet/runtime#54147 is what caused this. In that PR, the following assemblies will now be flowing through as netcoreapp assemblies instead of netstandard, and the windows-specific platform annotations are now applying:

  • Microsoft.Win32.Registry
  • System.Security.Principal.Windows

Those 2 assemblies are the sources of the APIs the analyzer warnings are related to. That means the CLI is calling into windows-specific APIs without guards, but that was previously undetected.

As @buyaa-n mentioned, the annotations would have to be applied all the way out the call stack. I suggest wrapping the original 3 call sites flagged with #pragma warning disable CA1416 // Platform Compatibility Analyzer and logging an issue for the CLI to address these issues separate from this dependency update PR.

@ViktorHofer -- I don't know if we recognized dotnet/runtime#54147 as being a breaking change because of it potentially introducing build warnings. If not, we should circle back and document it as such for the Preview release.

@joeloff
Copy link
Member

joeloff commented Jun 16, 2021

OK, let me add the pragma. The DependencyProvider can get a class level attribute too eventually since it's all related to MSI/Registry which is Windows only, and the other class as well it seems since it's fiddling with Windows environment variables like %UserProfile%

@ViktorHofer
Copy link
Member

@ViktorHofer -- I don't know if we recognized dotnet/runtime#54147 as being a breaking change because of it potentially introducing build warnings. If not, we should circle back and document it as such for the Preview release.

Yes, these types of changes are part of the bigger effort of dead-ending packages we don't support anymore in .NET 6 for which we have a breaking change notice in the draft right now.

That said, we have another 40-50 libraries in dotnet/runtime which don't target NetCoreAppCurrent today and which might need additional nullability and platform analyzer changes as those aren't caught today because these libs are targeting .NETStandard: dotnet/runtime#54012. Whenever this will happen, we will likely see more breaking changes.

@joeloff
Copy link
Member

joeloff commented Jun 16, 2021

Locally I'm seeing some other errors around nullable that we'd need to fix too for this PR to pass. Should have it ready in a few

@joeloff
Copy link
Member

joeloff commented Jun 16, 2021

@ViktorHofer is there a list of packages that's going out of support? Also, these packages won't be available in .NET 6 even though they may have shipped during an earlier preview, is that correct?

@ViktorHofer
Copy link
Member

@ViktorHofer is there a list of packages that's going out of support? Also, these packages won't be available in .NET 6 even though they may have shipped during an earlier preview, is that correct?

@terrajobst is finishing-up his draft and we will publish it as a breaking change notice alongside Preview 5. Meanwhile, here's the list of dead-ended packages. These are all now inbox starting with .NET 6 Preview 6.

  • System.ComponentModel.Annotations
  • System.Security.Cryptography.Cng
  • System.Security.Cryptography.OpenSsl
  • Microsoft.Win32.Registry
  • System.IO.FileSystem.AccessControl
  • System.IO.Pipes.AccessControl
  • System.Security.AccessControl
  • System.Security.Principal.Windows

@joeloff
Copy link
Member

joeloff commented Jun 16, 2021

@ViktorHofer is there a list of packages that's going out of support? Also, these packages won't be available in .NET 6 even though they may have shipped during an earlier preview, is that correct?

@terrajobst is finishing-up his draft and we will publish it as a breaking change notice alongside Preview 5. Meanwhile, here's the list of dead-ended packages. These are all now inbox starting with .NET 6 Preview 6.

  • System.ComponentModel.Annotations
  • System.Security.Cryptography.Cng
  • System.Security.Cryptography.OpenSsl
  • Microsoft.Win32.Registry
  • System.IO.FileSystem.AccessControl
  • System.IO.Pipes.AccessControl
  • System.Security.AccessControl
  • System.Security.Principal.Windows

Awesome, my workload features depend on almost all of these :)

@joeloff
Copy link
Member

joeloff commented Jun 17, 2021

@wli3 Any idea what the failure is? It seems to be a test case testing for a failure, but failing for some other reason.

@ViktorHofer
Copy link
Member

ViktorHofer commented Jun 17, 2021

Hmm the path passed in seems wrong: \\.\COM56

Microsoft.NET.PackTool.targets(70,5): error MSB4018: The \"GenerateToolsSettingsFile\" task failed unexpectedly. [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018: System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. : '\\.\COM56' [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.NtCreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) in System.Private.CoreLib.dll:token 0x6000123+0x112 [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) in System.Private.CoreLib.dll:token 0x6000122+0x6 [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at System.IO.Strategies.WindowsFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) in System.Private.CoreLib.dll:token 0x6005e31+0x2b [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) in System.Private.CoreLib.dll:token 0x6005d93+0x28 [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) in System.Private.CoreLib.dll:token 0x60059d2+0x0 [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at System.Xml.XmlWriterSettings.CreateWriter(String outputFileName) in System.Private.Xml.dll:token 0x60016eb+0x28 [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at System.Xml.XmlWriter.Create(String outputFileName, XmlWriterSettings settings) in System.Private.Xml.dll:token 0x6001676+0xa [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at System.Xml.Linq.XDocument.Save(String fileName, SaveOptions options) in System.Private.Xml.Linq.dll:token 0x60001b0+0x3c [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at System.Xml.Linq.XDocument.Save(String fileName) in System.Private.Xml.Linq.dll:token 0x60001ae+0x0 [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateToolsSettingsFile.ExecuteCore() in /_/src/Tasks/Microsoft.NET.Build.Tasks/GenerateToolsSettingsFile.cs:line 29 [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() in /_/src/Tasks/Common/TaskBase.cs:line 38 [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() in Microsoft.Build.dll:token 0x60015f9+0x23 [C:\h\w\A22A08BF\t\dotnetSdkTests\glh5q3pn.sk4\It_collects_E---795E5A8E\HelloWorld.csproj]
C:\h\w\A22A08BF\p\d\sdk\6.0.100-ci\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(70,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) in Microsoft.Build.dll:token 0x6001478+0x2b5 

…0617.1

Microsoft.NETCore.Platforms , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NET.HostModel , Microsoft.Extensions.DependencyModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , System.CodeDom , VS.Redist.Common.NetCore.SharedFramework.x64.6.0
 From Version 6.0.0-preview.6.21314.2 -> To Version 6.0.0-preview.7.21317.1
@joeloff
Copy link
Member

joeloff commented Jun 17, 2021

Hmm the path passed in seems wrong: \\.\COM56

Yeah I saw that, but that's the point of the test. It looks like it's generating a different exception now. It previously expected FileNotFound, but getting InvalidPath instead.

@ViktorHofer
Copy link
Member

ViktorHofer commented Jun 17, 2021

@adamsitnik could this be related to your recent IO changes?

@danmoseley
Copy link
Member

I opened issue for the exception type that @joeloff already worked around.

@dotnet-maestro dotnet-maestro bot merged commit 84886a6 into main Jun 17, 2021
@dotnet-maestro dotnet-maestro bot deleted the darc-main-86f616f2-fc3d-4bc0-88d0-855d60757dad branch June 17, 2021 16:11
@mmitche
Copy link
Member

mmitche commented Jun 17, 2021

@joeloff I think we may need some things ported to the p6 PR too, if you're not already on it.

@joeloff
Copy link
Member

joeloff commented Jun 17, 2021

@mmitche you referring to #18291 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants