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.

Sent from my iPhone

> On Aug 8, 2016, at 10:42 PM, Luke Howard <lu...@padl.com> wrote:
> 
> Would it be possible to separate the change to NSKeyedUnarchiver in 1d1ddba9 
> into a separate commit?
> 
>> On 5 Aug 2016, at 6:21 AM, Philippe Hausler via swift-dev 
>> <swift-dev@swift.org> wrote:
>> 
>> With a freshly built toolchain from ToT swift, building ToT 
>> swift-corelibs-foundation I am getting some very strange failures in the 
>> unit tests:
>> 
>> Test Suite 'TestNSKeyedArchiver' started at 13:15:01.843
>> Test Case 'TestNSKeyedArchiver.test_archive_array' started at 13:15:01.843
>> assertion failed: file 
>> /Volumes/Users/phausler/Documents/Public/swift/swift-corelibs-foundation/Foundation/NSKeyedArchiver.swift,
>>  line 23
>> 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
>> Current stack trace:
>> 
>> this is being caused by the line:
>> 
>> let classReference = innerDecodingContext.dict["$class"] as? 
>> CFKeyedArchiverUID
>> 
>> CFKeyedArchiverUID being AnyObject
>> 
>> and 
>> 
>> class DecodingContext {
>>       fileprivate var dict : Dictionary<String, Any>
>>    …
>> }
>> 
>> It claims a conditional cast from Any? to AnyObject always succeeds but it 
>> is giving me an unexpected type later on
>> 
>> Changing to:
>> 
>> let classReference = innerDecodingContext.dict["$class"] as 
>> CFKeyedArchiverUID?
>> 
>> Then makes the process no longer crash, however it then fails in an even 
>> more strange way:
>> 
>> 
>> guard let root = try unarchiver.decodeTopLevelObjectOfClasses(classes,
>>                       forKey: NSKeyedArchiveRootObjectKey) as? NSObject else 
>> {
>> 
>> 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!
>> 
>> Perhaps there is some other failure that I am not seeing underpinning this?
>> _______________________________________________
>> swift-dev mailing list
>> swift-dev@swift.org
>> https://lists.swift.org/mailman/listinfo/swift-dev
> 
> --
> www.lukehoward.com
> soundcloud.com/lukehoward
> 
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to