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
Bring back System.IO.Pipes.AccessControl package and make it available in .NET 5.0 #38177
Conversation
Tagging subscribers to this area: @safern, @ViktorHofer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add the new PackageVersion here and map it to the AssemblyVersion:
https://github.com/dotnet/runtime/blob/master/src/libraries/pkg/baseline/packageIndex.json#L3384
src/libraries/System.IO.Pipes.AccessControl/pkg/System.IO.Pipes.AccessControl.pkgproj
Outdated
Show resolved
Hide resolved
@ericstj What is it exactly that you want me to test to make sure we don't regress the wpf scenario? @joperezr and I did try running the commands specified on that issue using my new package and it does still flag a conflict on that assembly, but Joe and I believe that this problem is caused by the netcoreapp3.0 targeting pack desktop facades which still forward to specific versions (as opposed to just forwarding to 0.0.0.0). My new package is not fixing this as I am just harvesting for everything except .net5 but it is also not making it worse, we basically have the same behavior than the previous package except that we now have an extra .NET 5 asset. |
We should find where WindowsDesktop consumes the old package and make sure it is set up to subscribe to the new package we build. Here's what I found: |
Also we should make sure we undo the stable version reference from Windows.Compatibility: runtime/src/libraries/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj Lines 51 to 54 in 54625f3
|
src/libraries/System.IO.Pipes.AccessControl/src/System.IO.Pipes.AccessControl.csproj
Show resolved
Hide resolved
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<IncludeDefaultReferences Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">false</IncludeDefaultReferences> | ||
<AssemblyVersion Condition="'$(TargetFramework)' == 'netcoreapp2.1'">4.0.3.0</AssemblyVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericstj believes that we should be able to get away without setting this and using 5.0.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, because we are still harvesting runtimes/win/lib/netcoreapp2.1
asset that is 4.0.3.0, so if we make lib/netcoreapp2.1
be 5.0.0.0 our packaging validation will fail saying that the compile time asset was found to support 5.0.0.0 but the runtime asset was found to support 4.0.3.0. If we wanted to do this, we would have to go and bring back the netcoreapp2.1-Windows_NT live build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that's right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we only needed to build net5.0
assets since that was the only place we could add surface area. @carlossanlop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed in order to avoid bringing the refs. This asset will only be used for compile time; but I guess that's a good point.
We would need to exclude this APIs for older targets so that they're not available there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See here: #38177 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, maybe the goal of avoiding using refs here might have been bad advice on my part. This is a full-facade in src, but contains typedefs in ref. By only shipping the src assembly we're shipping dangling type-forwards to the compiler 🤦♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that's right... dang it. No worries, none of use caught it either 😄
Addressed in the latest commit, @ericstj. PTAL. |
<IsPartialFacadeAssembly Condition="'$(TargetsWindows)' == 'true'">true</IsPartialFacadeAssembly> | ||
<OmitResources Condition="'$(TargetsWindows)' == 'true'">true</OmitResources> | ||
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage> | ||
<TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix</TargetFrameworks> | ||
<TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;netcoreapp2.1;$(NetCoreAppCurrent)</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericstj we needed to add the netcoreapp2.1 config in order to workaround the fact that we were missing two declared dependencies in NCA2.1 given that it would take now the NS2.0 assembly as the compile asset. This workaround is less than ideal, but likely preferable to add back the refs to the package, do you agree with that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chatted with him on my 1:1 with regards on this, and he said that he prefers doing this than bringing back the ref assemblies and that seems like the best workaround.
He also suggested that we could exclude the compile asset from the package and so it would only be used to calculate dependencies but that either way was fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little surprised we didn't copy the PackageDependencies from netstandard2.0 to netcoreapp2.1 here: https://github.com/dotnet/arcade/blob/2fd7a99a9bc16b04312b816e3ff0aade830efbeb/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.targets#L680
Barring that another hack we could use here would be to copy the netstandard2.0 harvested asset into lib/netcoreapp2.1 as well.
Test failure is unrelated to this change: |
Fixes: #38123
Pending making sure we don't regress this: #30813
cc @joperezr @safern @ericstj @Jozkee