[swift-corelibs-dev] Strange behavior the same code fails when building a Cocoa CLI and succeeds in Swift-corelibs-foundation context.

Benoit Pereira da silva bpds at me.com
Mon Dec 18 11:29:35 CST 2017


Thanks Philippe,


> Good find, 
> You can make a pull request and we can get our continuous integration servers to start building that and testing your change – that is probably the easiest way to get validation on your tests and changes.
> There are a few issues however with your test that might be worth considering. Comments inline…
… 
> Building a CLI tool will use the objective-c Foundation in the system so that wont use your freshly built swift-corelibs-foundation. So that means we have a bug in the objc side if this is actually happening on Darwin (which is a completely different issue…) That should be a radar against Foundation and I definitely think that may very well be a bug… 


I have been filling a radar https://bugreport.apple.com/web/?problemID=36107307 <https://bugreport.apple.com/web/?problemID=36107307>
I do think you are right it's a bug in the Objc Foundation… and trying to solve it in "swift-corelibs-foundation" was a mistake :) 


>>         setlocale(LC_ALL,"fr_FR”)
> 
> This change will set the locale globally for the rest of the process, you probably want to make sure to reset the locale back to it’s original state.


Setting the locale globally was just a temporary test.

But i do think that it triggers a serious question:  Should all your tests be ran on all the available locales? 
You will certainly find a smarter solution …

Benoit



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20171218/5e0c957b/attachment.html>


More information about the swift-corelibs-dev mailing list