-
Notifications
You must be signed in to change notification settings - Fork 555
Foundation for Xcode 10 Beta 1-2 #4375
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
Conversation
|
Build failure !!! Couldn't read commit file !!! |
|
Build success |
| [Static] | ||
| [Export ("archivedDataWithRootObject:requiringSecureCoding:error:")] | ||
| [return: NullAllowed] | ||
| NSData ArchivedDataWithRootObject (NSObject @object, bool requiresSecureCoding, [NullAllowed] out NSError error); |
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.
WithRootObject is the first parameter, not the method name (you can double check the swift name)
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.
Agreed - However I was matching the existing name:
https://github.com/xamarin/xamarin-macios/blob/master/src/foundation.cs#L2287
since it's the same method with just new params, and we're obsoleting one for another.
if we value clear naming over consistency though, I'm happy to change.
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.
Maybe put this inside a XAMCORE_4_0 so we do not forget?
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 not opposed, but i'm just not sure it's worth making making move from ArchivedDataWithRootObject -> GetArchivedData. I'm happy to do so however.
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 think we should rename / obsolete bad APIs whenever we can. It happened to me several times already this season. Sometimes you also realize the name was a poor choice thanks to a new API. As a rule of thumb I really believe we should fix old mistakes whenever we can.
|
👀 |
dalexsoto
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.
Otherwise it looks good to me
src/foundation.cs
Outdated
| { | ||
| [Static] | ||
| [Export ("allowedTopLevelClasses", ArgumentSemantic.Copy)] | ||
| Class[] AllowedTopLevelClasses { get; } |
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.
Maybe a Wrap to have an array of Type
|
|
||
| [Watch (5,0), NoTV, NoMac, iOS (12,0)] | ||
| [Static] | ||
| [Export ("deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler:")] |
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.
Maybe we can add [Async] here
|
|
||
| [Watch (5,0), NoTV, NoMac, iOS (12,0)] | ||
| [Static] | ||
| [Export ("deleteAllSavedUserActivitiesWithCompletionHandler:")] |
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.
Same, [Async]
|
I added the code review changes and a test for the new [Wrap]. I'm currently only on laptop and can't test it locally. |
|
Build failure Test results9 tests failed, 55 tests passed. Failed tests
|
|
|
||
| NSDictionary<NSString, NSString> testValues = new NSDictionary<NSString, NSString> ((NSString)"1", (NSString)"a"); | ||
| NSData data = NSKeyedArchiver.ArchivedDataWithRootObject (testValues, true, out NSError error); | ||
| Assert.IsNull (error); |
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.
name the asserts, too many reports (and sometimes bad symbols) makes debugging failures harder than it have to be
| public void GetUnarchivedObject_TypeWrappers () | ||
| { | ||
| if (!TestRuntime.CheckXcodeVersion (10, 0)) | ||
| Assert.Ignore ("Ignoring GetUnarchivedObject_TypeWrappers as requires new APIs"); |
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.
minor: you can assert the Xcode version (shorter than a version check + assert)
| public void DataTransformer_AllowedTopLevelTypes_WrapperTests () | ||
| { | ||
| if (!TestRuntime.CheckXcodeVersion (10, 0)) | ||
| Assert.Ignore ("Ignoring DataTransformer_AllowedTopLevelTypes_WrapperTests as requires new APIs"); |
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.
minor: you can assert the Xcode version (shorter than a version check + assert)
src/foundation.cs
Outdated
| [Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)] | ||
| [BaseType (typeof(NSValueTransformer))] | ||
| interface NSSecureUnarchiveFromDataTransformer | ||
| { |
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.
Minor: styling, this goes 1 line higher (:
|
Build failure Test results9 tests failed, 55 tests passed. Failed tests
|
|
Looks like a legit ios failure - DataTransformer_AllowedTopLevelTypes_WrapperTests |
|
I'm punting on those bindings until I fix - #4441 This PR has waited long enough already. |
|
Build success |
dalexsoto
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.
LGTM 👍
Things pointed out are fixed, also dismissing because FTO
No description provided.