-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[release/6.0] Bring back System.Security.AccessControl package #57816
Merged
ViktorHofer
merged 5 commits into
dotnet:release/6.0
from
ViktorHofer:AddBackSystemThreadingAccessControlPkg
Sep 1, 2021
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
18efc63
Bring back System.Threading.AccessControl pkg
ViktorHofer 4d21a28
Fix S.Security.Permissions dependencies
ViktorHofer a364bad
Fix .NETFramework configurations
ViktorHofer ff090db
Add ILLink Descriptors file to workaround Trimmer removing an interfa…
joperezr b0f2565
add .LibraryBuild suffix to descriptors file
joperezr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../Microsoft.Extensions.Configuration.Xml/src/Microsoft.Extensions.Configuration.Xml.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ft.Extensions.Configuration.Xml/tests/Microsoft.Extensions.Configuration.Xml.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...guration/tests/FunctionalTests/Microsoft.Extensions.Configuration.Functional.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/libraries/Microsoft.Win32.SystemEvents/tests/Microsoft.Win32.SystemEvents.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...m.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...uration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<configuration> | ||
<!-- This disables restore in VS for projects that target platform specific target frameworks older than net5.0. --> | ||
<packageRestore> | ||
<!-- The 'automatic' key is set to True when the "Automatically check for missing packages during | ||
build in Visual Studio" checkbox is set. Clearing the box sets this to False and disables | ||
automatic restore. --> | ||
<add key="automatic" value="False" /> | ||
<!-- The 'enabled' key is True when the "Allow NuGet to download missing packages" checkbox is set. | ||
Clearing the box sets this to False, disabling command-line, automatic, and MSBuild-integrated restore. --> | ||
<add key="enabled" value="False" /> | ||
</packageRestore> | ||
</configuration> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you explain the logic behind the changes on netfx configurations and why we are adding OS to some of them? Is the one here due to the package reference to a windows-only package?
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.
Libraries which projectreference rid-specific libraries need to be rid-specific as well. In this case, all the libraries that I annotated incorrectly referenced the
netstandard2.0
asset instead of thenet461-windows
asset. The technical reason behind that is thatnet461
can't referencenet461-windows
, sonetstandard2.0
wins.I discovered that when bringing back System.Security.AccessControl and had to make changes to use it as a live reference.
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 see, this seems like a very fragile system when trying to get them correct. Should we instead do one of the following:
Of course we don't have to fix it here, but I thought of bringing the suggestions here anyway
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.
Agree with this being a fragile design. It predates me, it existed for several years and apparently it worked just fine. Even though this is hard to get right without understanding RID compatibility rules, it's the closest / best implementation based on the rid graph.
Reason why we didn't do this yet is because of these two major downsides:
runtime/eng/packaging.targets
Lines 104 to 108 in c94b75f
-windows
part needs to be stripped from the target framework alias: https://github.com/dotnet/arcade/blob/761d2e6545a31d2ebf9cb60443ed2a9c2f8268b5/src/Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk.props#L21-L22. Adding the-windows
rid to every .NETFramework tfm results in this hack being applied in many more places and more NuGet.config files being necessary to disable VS's restore which can't handle restoring them:runtime/src/libraries/System.Data.OleDb/NuGet.config
Line 2 in c94b75f
Correct me if I'm wrong but I believe the ProjectReference protocol doesn't expose the necessary information to implement such a check. Of course you could always implement custom targets and MSBuild calls but that won't work with static graph build which we want to leverage.
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 believe at one point package validation would catch any mistake here and would actually drive folks to do the right thing / teach them about the RID specific asset being preferred. Not sure if that's still the case.
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 can you please elaborate on "at one point ... would catch any mistakes here"? Do you mean that the new PackageValidation infrastructure will eventually catch this in the future, did you refer the the old pkgproj system or to the runtime repo specific testPackages infra (which creates wrapper projects and restores the package)?
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 the sake of this discussion, I filed #58495 to simplify .NETFramework tfms.
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 talking about package testing that we run that consumes the nuget packages we build in a project. We would run that with RIDs on .NETFramework, so it would see duplicate runtime types in the case someone forgot to include a RID specific asset, and would see duplicate reference types if someone forgot the RID-less asset. I think we may still catch this today if we use the runtimeTargets on .NETFramework.
Previously we would also sometimes catch this in package build itself if the assembly versions differed (as is the case in servicing).
I added a comment to the issue about making sure we have test coverage of this scenario.