Re: [swift-dev] swiftCore dependencies on Foundation

2016-10-04 Thread Joe Groff via swift-dev

> On Oct 4, 2016, at 10:11 AM, Jordan Rose via swift-dev  
> wrote:
> 
> In HuonW’s recent pull request  we 
> hit an unusual error :
> 
>> 2016-10-03 12:34:08.112 swift[56714:13650955] *** Terminating app due to 
>> uncaught exception 'NSInvalidArgumentException', reason: '*** -length only 
>> defined for abstract class.  Define -[_TtCs19_NSContiguousString length]!'
>> *** First throw call stack:
>> (
>>  0   CoreFoundation  0x7fff9cbe64f2 
>> __exceptionPreprocess + 178
>>  1   libobjc.A.dylib 0x7fff9daaa73c 
>> objc_exception_throw + 48
>>  2   CoreFoundation  0x7fff9cc4d4bd 
>> +[NSException raise:format:] + 205
>>  3   Foundation  0x7fff943e8dbd 
>> NSRequestConcreteImplementation + 229
>>  4   Foundation  0x7fff9442588a -[NSString 
>> length] + 19
>>  5   CoreFoundation  0x7fff9cc2b613 
>> CFStringHashNSString + 51
>>  6   libswiftCore.dylib  0x000114f7ef56 
>> _TTSfq4s___TFSSg9hashValueSi + 118
>>  7   libswiftCore.dylib  0x000114f3b96b 
>> _TTWSSs8HashablesFS_g9hashValueSi + 43
>>  8   libswiftCore.dylib  0x000114e8f0a2 
>> _TFVs24_NativeDictionaryStorage7_bucketfxSi + 34
> 
> We’re not really sure how this could happen, though. _NSContiguousString 
> certainly does implement -length 
> ,
>  and even though there’s an outstanding PR 
>  to change it to a property that 
> shouldn’t cause this kind of issue. (It’s not marked @objc, but it shouldn’t 
> need to be because the superclass is 
> .)
> 
> Anyone know what’s going on here?

I didn't see any obvious reason it would, but since this patch messes with 
IRGen it would be good to double-check that we still emit ObjC class metadata 
with the correct format. This seems like the kind of problem that could arise 
if we ended up generating the method tables incorrectly for some reason.

-Joe

___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


[swift-dev] swiftCore dependencies on Foundation

2016-10-04 Thread Jordan Rose via swift-dev
In HuonW’s recent pull request  we 
hit an unusual error :

> 2016-10-03 12:34:08.112 swift[56714:13650955] *** Terminating app due to 
> uncaught exception 'NSInvalidArgumentException', reason: '*** -length only 
> defined for abstract class.  Define -[_TtCs19_NSContiguousString length]!'
> *** First throw call stack:
> (
>   0   CoreFoundation  0x7fff9cbe64f2 
> __exceptionPreprocess + 178
>   1   libobjc.A.dylib 0x7fff9daaa73c 
> objc_exception_throw + 48
>   2   CoreFoundation  0x7fff9cc4d4bd 
> +[NSException raise:format:] + 205
>   3   Foundation  0x7fff943e8dbd 
> NSRequestConcreteImplementation + 229
>   4   Foundation  0x7fff9442588a -[NSString 
> length] + 19
>   5   CoreFoundation  0x7fff9cc2b613 
> CFStringHashNSString + 51
>   6   libswiftCore.dylib  0x000114f7ef56 
> _TTSfq4s___TFSSg9hashValueSi + 118
>   7   libswiftCore.dylib  0x000114f3b96b 
> _TTWSSs8HashablesFS_g9hashValueSi + 43
>   8   libswiftCore.dylib  0x000114e8f0a2 
> _TFVs24_NativeDictionaryStorage7_bucketfxSi + 34

We’re not really sure how this could happen, though. _NSContiguousString 
certainly does implement -length 
,
 and even though there’s an outstanding PR 
 to change it to a property that 
shouldn’t cause this kind of issue. (It’s not marked @objc, but it shouldn’t 
need to be because the superclass is 
.)

Anyone know what’s going on here?

Jordan___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev