-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix ComponentDocumentDesigner references in DesignerAttribute to include right base type #44774
Conversation
@@ -181,7 +181,7 @@ public sealed partial class EventHandlerList : System.IDisposable | |||
public void RemoveHandler(object key, System.Delegate? value) { } | |||
} | |||
[System.ComponentModel.DesignerAttribute("System.ComponentModel.Design.ComponentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] | |||
[System.ComponentModel.DesignerAttribute("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] | |||
[System.ComponentModel.DesignerAttribute("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.ComponentModel.Design.IRootDesigner))] |
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'll need the fully qualified name for this one. It lives in TypeConverter on core. It lived in System on .NETFramework. Let's use the .NETFramework identity.
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.
Good catch. I fixed this and also fixed another instance of this in another DesignerAttribute that used this designer.
We should make sure to test this. @DustinCampbell suggested
We'd need changes to our test infra to do that in a our unit tests, since it'd require a windows desktop shared framework, but we should make sure we at least manually verify this. |
Sounds good. I'll test this locally. |
@@ -1,8 +1,18 @@ | |||
Compat issues with assembly System.Diagnostics.Process: | |||
Compat issues with assembly netstandard: | |||
CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerAttribute' on 'System.ComponentModel.IComponent' changed from '[DesignerAttribute("System.ComponentModel.Design.ComponentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]' in the contract to '[DesignerAttribute("System.ComponentModel.Design.ComponentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]' in the implementation. |
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 that we're catching this now as a diff with past release. Does API compat flag the original issue as a diff with netfx? If so are there any other similar diffs?
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.
No it didn't catch it. I don't know why. Based on reading these errors, it seems like APICompat is not catching the right "Diff" the diff is in the DesignerAttribute
that specifies a ComponentDocumentDesigner
.
This is the only diff I get on my local build and on CI.
I tested this locally using the local runtime pack we build in dotnet/runtime and I can see the issue no longer repros. I reproed and then applied the fix and it is no longer showing up. Merging this. |
/backport to release/5.0 |
Started backporting to release/5.0: https://github.com/dotnet/runtime/actions/runs/371087316 |
@safern backporting to release/5.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix IComponent Designer attribute that was missing base designer type
Applying: Fix IRootDesigner references to use assembly qualified name
Applying: Fix build failures
error: sha1 information is lacking or useless (src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 Fix build failures
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
…ude right base type (dotnet#44774) * Fix IComponent Designer attribute that was missing base designer type * Fix IRootDesigner references to use assembly qualified name * Fix build failures
Fixes: #31428