-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Stop harvesting S.IO.Pipes.AccessControl #52294
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
Stop harvesting S.IO.Pipes.AccessControl #52294
Conversation
The removed configurations (netstandard1.3, netcoreapp2.1, net46) aren't built anymore. Instead the already built matching binaries from the latest available packages are redistributed when packaging these libraries. Dropping these assets as the minimum supported set of platforms are ones that support netstandard2.0 and are still in-support. As an example, also dropping the netcoreapp2.1 asset which isn't supported anymore and upgrading it to netcoreapp3.1.. For .NET Framework, there's still a net461 configuration present to avoid binding redirect issues. The ugly part of this change is that System.IO.Pipes.AccessControl depends on an internal API of System.IO.Pipes for all .NETCoreApp configurations. Because of that, for configurations that don't apply to the current band (netcoreapp3.1, net5.0), the runtime packs need to be downloaded so that runtime assembly can be referenced. Ideally we will come up with a better solution to not require runtime packs to be fetched as that adds 60MB of download size to the repo and breaks source build. Contributes to dotnet#47530
Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer Issue DetailsThe removed configurations (netstandard1.3, netcoreapp2.1, net46) aren't Dropping these assets as the minimum supported set of platforms are ones The ugly part of this change is that System.IO.Pipes.AccessControl @ericstj I'm considering checking in the netcoreapp3.1 and net5.0 Pipes runtime assembly into the repository directly so that they can be referenced and the runtime packs don't need to be fetched. What are your thoughts on this? Also we need to come up with a better solution as otherwise this will plague us for the entire existence of this package. Contributes to #47530
|
src/libraries/System.IO.Pipes.AccessControl/src/System.IO.Pipes.AccessControl.csproj
Outdated
Show resolved
Hide resolved
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 OK with this. It's a bit of a trick which I'd want the IO owners to sign off on. I'd want to make sure that whatever questions they have we document in comments so we give future devs a chance at understanding what's going on here.
<ItemGroup> | ||
<Compile Include="System.IO.Pipes.cs" /> | ||
<Compile Include="System.IO.Pipes.Internal.cs" Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)'" /> |
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 guess this name is OK. I couldn't think of anything better.
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 scanned existing patterns of that and found couple of ".Internal" files so I renamed it from ".Internals" to ".Internal".
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.
Second attempt (not sure why GitHub deleted my original message):
"*TypeForwards.cs"? I don't mind the currently selected name, since it seems to align with other similar patterns.
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.
Even thought that file is the input to generate type forwards, it doesn't contain any. It only lists non exposed APIs which is why we chose the "Internal" wording.
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.
LGTM. I left a few questions but mainly for my own education, not blocking.
@@ -57,6 +57,15 @@ | |||
<resheader name="writer"> | |||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
</resheader> | |||
<data name="ArgumentOutOfRange_NeedValidPipeAccessRights" xml:space="preserve"> |
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.
What was the reason for the addition of these resource strings? I don't see src changes in this PR, which is why I ask.
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.
These strings are used by the added netstandard2.0 build.
@@ -2,13 +2,9 @@ | |||
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" /> | |||
<ItemGroup> | |||
<ProjectReference Include="..\ref\System.IO.Pipes.AccessControl.csproj"> | |||
<SupportedFramework>$(NetCoreAppCurrent)</SupportedFramework> | |||
<SupportedFramework>net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework> |
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.
For my own education, why was uap added again? I remember it was removed some time ago.
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.
uap10.0.16299 supports netstandard2.0
. As we are producing such an asset, we mark uap10.0.16299
as a supported framework.
@@ -65,14 +65,4 @@ public partial class PipeSecurity : System.Security.AccessControl.NativeObjectSe | |||
public void SetAccessRule(System.IO.Pipes.PipeAccessRule rule) { } | |||
public void SetAuditRule(System.IO.Pipes.PipeAuditRule rule) { } | |||
} | |||
|
|||
public static class AnonymousPipeServerStreamAcl |
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 now remember these APIs were added to .NET Core with the intention of bringing ACL support to pipes, which already existed in .NET Framework.
There were other ACL cases in which I worked were the new extensions class needed to be consumable both from .NET Core and .NET Framework. It seems it's not the case with these two classes, so this change makes sense (within my limited understanding of the infra changes).
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. --> | ||
<PropertyGroup> | ||
<IsPartialFacadeAssembly Condition="'$(TargetFramework)' == 'net461'">true</IsPartialFacadeAssembly> |
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.
Why was it necessary to add this net461 check (along with others)? It was my understanding that the *PipeServerStreamAcl
APIs were only available in .NET Core.
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.
We are generating a partial facade for System.IO.Pipes.AccessControl so that the package can be used on .NET Framework as well so that customers don't need to condition their PackageReferences for different TFMs. I can share more details (perhaps offline) in case you are interested.
The removed configurations (netstandard1.3, netcoreapp2.1, net46) aren't
built anymore. Instead the already built matching binaries from the
latest available packages are redistributed when packaging these
libraries.
Dropping these assets as the minimum supported set of platforms are ones
that support netstandard2.0 and are still in-support. As an example,
also dropping the netcoreapp2.1 asset which isn't supported anymore and
upgrading it to netcoreapp3.1.. For .NET Framework, there's still a
net461 configuration present to avoid binding redirect issues.
cc @carlossanlop
Contributes to #47530