-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Moving System.Security.Permissions Types from WPF #38405
Conversation
|
Related: dotnet/wpf#241 |
|
Can you help us understand your comment about What happens if |
ericstj
left a 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.
Fix up the netfx / package build
When attempting to hollow out this type in WPF, I discovered that While this will need to be fixed in WPF regardless, I decided to keep the functionality intact since this could be a potential breaking change in other places where this type was used to pass contained data. |
|
Can you explain more on what the end user experience here is? When we spoke offline it seemed that hollowing out these types broke their core functionality, and so any app that was using them would be broken moving to .NET Core. Is that the experience we will still have now? Or is this what you are referring to with |
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlAccessLevel.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlAccessLevel.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlAccessLevel.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlAccessLevel.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlAccessLevel.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Security/Permissions/MediaPermission.cs
Outdated
Show resolved
Hide resolved
|
You don’t need to spend a time of effort on these. We don’t want to give folks any illusion that these types are functional. For details you can see https://github.com/dotnet/corefx/issues/9482 and related commits. |
When we spoke offline, I was specifically referring to what I mention above with |
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Xaml/Permissions/XamlLoadPermission.cs
Outdated
Show resolved
Hide resolved
vatsan-madhavan
left a 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.
See comments re PublicKeyToken
ericstj
left a 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.
Please add basic tests along the same line as what already exists for the other dummy types.
src/System.Security.Permissions/ref/System.Security.Permissions.csproj
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Security/Permissions/MediaPermission.cs
Outdated
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Security/Permissions/MediaPermission.cs
Show resolved
Hide resolved
src/System.Security.Permissions/src/System/Security/Permissions/MediaPermission.cs
Outdated
Show resolved
Hide resolved
ericstj
left a 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.
Thanks!
|
Hello @ericstj! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@ericstj yeah I understand that. I was trying to understand what the developer experience is for porting an app to .NET Core when their app uses these types. Is it expected that the app just breaks when the developer presses F5? Does the developer get an exception with an error message, or does some functionality in their app that was depending on these just no longer work? |
I assume the expectation is that everything works essentially as if the app was running in full trust, ie., all demands always succeed. Is that not what will happen? |
That's the expectation, modulo the fact that CAS-the-functionality in itself will no longer work - which is old news for .NET Core (and really, old news even for .NET Framework), but this will be the first time many WPF developers will encounter this shift. All first-order breaks would be graceful-degradations (like demands silently succeeding as a no-op behind the scenes) There can be second order breaks that only affect niche/advanced scenarios. For e.g., say someone has implemented a type that is similar to |
In order to break the System.Security.Permissions dependency WPF has, we need to move the public types defined in WPF into the System.Security.Permissions.dll. All the types are hollowed out with the exception of XamlAccessLevel since there is data being stored and retrieved there that isn't purely about permissions, so this is done to avoid potential breaks.