-
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
Move Editor Attribute to S.CM.Primitives and apply to types that had it in netfx #41145
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
@@ -1563,6 +1551,7 @@ public abstract partial class DesignerOptionService : System.ComponentModel.Desi | |||
protected virtual bool ShowDialog(System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection options, object optionObject) { throw null; } | |||
object System.ComponentModel.Design.IDesignerOptionService.GetOptionValue(string pageName, string valueName) { throw null; } | |||
void System.ComponentModel.Design.IDesignerOptionService.SetOptionValue(string pageName, string valueName, object value) { } | |||
[System.ComponentModel.EditorAttribute("", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] |
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.
Empty string looks odd but that seems consistent with .NETFramework
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 if we wanted we could have UITypeEditor as the editor type and base type empty?
...raries/System.Collections.Specialized/src/System/Collections/Specialized/StringDictionary.cs
Show resolved
Hide resolved
System.Data.IDataReader System.Data.IDbCommand.ExecuteReader() { throw null; } | ||
System.Data.IDataReader System.Data.IDbCommand.ExecuteReader(System.Data.CommandBehavior behavior) { throw null; } | ||
object System.ICloneable.Clone() { throw null; } | ||
System.Data.IDataReader? System.Data.IDbCommand.ExecuteReader() { throw null; } |
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.
Was this just a missed auto-gen the ref code from a previous commit?
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.
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.
Something is wrong here.
IDataReader ExecuteReader(); | |
IDataReader ExecuteReader(CommandBehavior behavior); |
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.
runtime/src/libraries/System.Data.OleDb/src/OleDbCommand.cs
Lines 605 to 608 in 89292fe
IDataReader IDbCommand.ExecuteReader() | |
{ | |
return ExecuteReader(CommandBehavior.Default); | |
} |
runtime/src/libraries/System.Data.OleDb/src/OleDbCommand.cs
Lines 616 to 619 in 89292fe
IDataReader IDbCommand.ExecuteReader(CommandBehavior behavior) | |
{ | |
return ExecuteReader(behavior); | |
} |
None of these are marked as nullable.
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 GenAPI
has a bug where it is finding a NullableContextAttribute(2)
in the same context given that these are non-visible members and we tell Roslyn to not preserve Nullable*
metadata for non-visible members. Maybe we should just skip these members in GenAPI
or just match the interface annotation instead.
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.
Fixed.
src/libraries/System.Drawing.Common/ref/System.Drawing.Common.cs
Outdated
Show resolved
Hide resolved
object System.ICloneable.Clone() { throw null; } | ||
System.Data.IDataReader? System.Data.IDbCommand.ExecuteReader() { throw null; } | ||
System.Data.IDataReader? System.Data.IDbCommand.ExecuteReader(System.Data.CommandBehavior behavior) { throw null; } | ||
object? System.ICloneable.Clone() { throw null; } |
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 the Clone()
method appears to be wrong:
public interface ICloneable | |
{ | |
object Clone(); | |
} |
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.
Fixed.
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. Thanks!
@jkotas I've never seen this before. I downloaded the payload and I do see coreclr.dll in the path it looked for it. |
Failures are: #41215 |
…it in netfx (dotnet#41145) * Move EditorAttribute to System.ComponentModel.Primitives * Add EditorAttribute to types that had it in netfx and fix some DesignerSerializableAttributes * PR Feedback * PR Feedback
Fixes: #31428
Also, I fixed a couple of type full names on DesignerSerializableAttributes that were missing Culture=neutral.
cc: @RussKie