Skip to content

Conversation

@chamons
Copy link
Contributor

@chamons chamons commented Jun 29, 2018

No description provided.

@chamons chamons requested a review from spouliot June 29, 2018 22:27
@chamons chamons requested a review from rolfbjarne as a code owner June 29, 2018 22:27
@monojenkins
Copy link
Collaborator

Build failure

!!! Couldn't read commit file !!!

@monojenkins
Copy link
Collaborator

Build success
Build succeeded
API Diff (from stable)
API Diff (from PR only) (please review changes)
Generator Diff (please review changes)
Test run succeeded

@spouliot spouliot added this to the xcode10 milestone Jul 2, 2018
[Static]
[Export ("archivedDataWithRootObject:requiringSecureCoding:error:")]
[return: NullAllowed]
NSData ArchivedDataWithRootObject (NSObject @object, bool requiresSecureCoding, [NullAllowed] out NSError error);
Copy link
Contributor

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)

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@stephen-hawley
Copy link
Contributor

👀

Copy link
Member

@dalexsoto dalexsoto left a 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

{
[Static]
[Export ("allowedTopLevelClasses", ArgumentSemantic.Copy)]
Class[] AllowedTopLevelClasses { get; }
Copy link
Member

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:")]
Copy link
Member

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:")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, [Async]

@chamons
Copy link
Contributor Author

chamons commented Jul 2, 2018

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.

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (please review changes)
Generator Diff (please review changes)
🔥 Test run failed 🔥

Test results

9 tests failed, 55 tests passed.

Failed tests

  • monotouch-test/iOS Unified 64-bits - simulator/Debug: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar): Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations): Failed
  • monotouch-test/tvOS - simulator/Debug: Failed
  • monotouch-test/tvOS - simulator/Debug (static registrar): Failed
  • monotouch-test/tvOS - simulator/Release (all optimizations): Failed
  • monotouch-test/watchOS - simulator/Debug: Failed
  • monotouch-test/watchOS - simulator/Debug (static registrar): Failed
  • monotouch-test/watchOS - simulator/Release (all optimizations): Failed


NSDictionary<NSString, NSString> testValues = new NSDictionary<NSString, NSString> ((NSString)"1", (NSString)"a");
NSData data = NSKeyedArchiver.ArchivedDataWithRootObject (testValues, true, out NSError error);
Assert.IsNull (error);
Copy link
Contributor

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");
Copy link
Contributor

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");
Copy link
Contributor

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)

[Watch (5,0), TV (12,0), Mac (10,14, onlyOn64: true), iOS (12,0)]
[BaseType (typeof(NSValueTransformer))]
interface NSSecureUnarchiveFromDataTransformer
{
Copy link
Contributor

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 (:

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (please review changes)
Generator Diff (please review changes)
🔥 Test run failed 🔥

Test results

9 tests failed, 55 tests passed.

Failed tests

  • monotouch-test/iOS Unified 64-bits - simulator/Debug: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar): Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations): Failed
  • monotouch-test/tvOS - simulator/Debug: Failed
  • monotouch-test/tvOS - simulator/Debug (static registrar): Failed
  • monotouch-test/tvOS - simulator/Release (all optimizations): Failed
  • monotouch-test/watchOS - simulator/Debug: Failed
  • monotouch-test/watchOS - simulator/Debug (static registrar): Failed
  • monotouch-test/watchOS - simulator/Release (all optimizations): Failed

@chamons
Copy link
Contributor Author

chamons commented Jul 11, 2018

Looks like a legit ios failure - DataTransformer_AllowedTopLevelTypes_WrapperTests

@chamons
Copy link
Contributor Author

chamons commented Jul 13, 2018

I'm punting on those bindings until I fix - #4441

This PR has waited long enough already.

@monojenkins
Copy link
Collaborator

Build success
Build succeeded
API Diff (from stable)
API Diff (from PR only) (please review changes)
Generator Diff (please review changes)
Test run succeeded

Copy link
Member

@dalexsoto dalexsoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@dalexsoto dalexsoto dismissed spouliot’s stale review July 13, 2018 18:27

Things pointed out are fixed, also dismissing because FTO

@chamons chamons merged commit 6d039cb into dotnet:xcode10 Jul 13, 2018
@chamons chamons deleted the xcode10-foundation branch July 13, 2018 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants