<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><div style="direction: inherit;">Not post facto of pushing it. I could not in good conscience push such a large change without making certain the tests passed. It was extractable but I squash merged back onto master to avoid conflicts.</div><br>Sent from my iPhone</div><div><br>On Aug 8, 2016, at 10:42 PM, Luke Howard <<a href="mailto:lukeh@padl.com">lukeh@padl.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span>Would it be possible to separate the change to NSKeyedUnarchiver in 1d1ddba9 into a separate commit?</span><br><span></span><br><blockquote type="cite"><span>On 5 Aug 2016, at 6:21 AM, Philippe Hausler via swift-dev <<a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a>> wrote:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>With a freshly built toolchain from ToT swift, building ToT swift-corelibs-foundation I am getting some very strange failures in the unit tests:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Test Suite 'TestNSKeyedArchiver' started at 13:15:01.843</span><br></blockquote><blockquote type="cite"><span>Test Case 'TestNSKeyedArchiver.test_archive_array' started at 13:15:01.843</span><br></blockquote><blockquote type="cite"><span>assertion failed: file /Volumes/Users/phausler/Documents/Public/swift/swift-corelibs-foundation/Foundation/NSKeyedArchiver.swift, line 23</span><br></blockquote><blockquote type="cite"><span>2016-08-04 13:15:07.650689 TestFoundation[47395:4939580] assertion failed: file /Volumes/Users/phausler/Documents/Public/swift/swift-corelibs-foundation/Foundation/NSKeyedArchiver.swift, line 23</span><br></blockquote><blockquote type="cite"><span>Current stack trace:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>this is being caused by the line:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>let classReference = innerDecodingContext.dict["$class"] as? CFKeyedArchiverUID</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>CFKeyedArchiverUID being AnyObject</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>and </span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class DecodingContext {</span><br></blockquote><blockquote type="cite"><span> fileprivate var dict : Dictionary<String, Any></span><br></blockquote><blockquote type="cite"><span> …</span><br></blockquote><blockquote type="cite"><span>}</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>It claims a conditional cast from Any? to AnyObject always succeeds but it is giving me an unexpected type later on</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Changing to:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>let classReference = innerDecodingContext.dict["$class"] as CFKeyedArchiverUID?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Then makes the process no longer crash, however it then fails in an even more strange way:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>guard let root = try unarchiver.decodeTopLevelObjectOfClasses(classes,</span><br></blockquote><blockquote type="cite"><span> forKey: NSKeyedArchiveRootObjectKey) as? NSObject else {</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>by expanding that out the decoded object is a NSArray (expected), but that cannot be represented as an NSObject?! This isn’t Swift, this is madness!</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Perhaps there is some other failure that I am not seeing underpinning this?</span><br></blockquote><blockquote type="cite"><span>_______________________________________________</span><br></blockquote><blockquote type="cite"><span>swift-dev mailing list</span><br></blockquote><blockquote type="cite"><span><a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a></span><br></blockquote><blockquote type="cite"><span><a href="https://lists.swift.org/mailman/listinfo/swift-dev">https://lists.swift.org/mailman/listinfo/swift-dev</a></span><br></blockquote><span></span><br><span>--</span><br><span><a href="http://www.lukehoward.com">www.lukehoward.com</a></span><br><span><a href="http://soundcloud.com/lukehoward">soundcloud.com/lukehoward</a></span><br><span></span><br></div></blockquote></body></html>