<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Joe,<div class=""><br class=""></div><div class="">Sure, bug reports are appreciated.</div><div class=""><br class=""></div><div class="">If you have the ability to check out the whole stack and try ToT, that would be great too. We are moving extremely rapidly right now on implementing missing pieces of Foundation.</div><div class=""><br class=""></div><div class="">- Tony</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 11, 2015, at 10:53 AM, Joseph Bell &lt;<a href="mailto:joe@iachieved.it" class="">joe@iachieved.it</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Thanks Tony, with LD_LIBRARY_PATH set to include usr/lib/swift/linux I can get the REPL to reproduce what I see with the compiler, and that's a blank line printed out:<div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">➜ &nbsp;dates &nbsp;LD_LIBRARY_PATH=/opt/apple/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04/usr/lib/swift/linux:$LD_LIBRARY_PATH swift printdate.swift&nbsp;</font></div><div class=""><br class=""></div></div><div class=""><div class=""><font face="monospace, monospace" class="">➜ &nbsp;dates &nbsp;</font></div></div><div class=""><br class=""></div><div class="">Which leads me to the obvious question, either I've forgotten how to use NSDateFormatter, or the implementation in the December 1 drop is silently not supporting setting the dateFormat property, which appears to be the case, as setting dateStyle and timeStyle do appear to work.</div><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">import Foundation</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">let dateFormatter = NSDateFormatter()</font></div><div class=""><font face="monospace, monospace" class="">dateFormatter.dateFormat = "dd-MM-yyyy"</font></div><div class=""><font face="monospace, monospace" class="">var dateStr = dateFormatter.stringFromDate(NSDate())</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">print(dateStr)</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">dateFormatter.dateStyle = .MediumStyle</font></div><div class=""><font face="monospace, monospace" class="">dateFormatter.timeStyle = .MediumStyle</font></div><div class=""><font face="monospace, monospace" class="">dateStr = dateFormatter.stringFromDate(NSDate())</font></div><div class=""><font face="monospace, monospace" class="">print(dateStr)</font></div></div><div class=""><br class=""></div><div class="">results in:</div><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">➜ &nbsp;dates &nbsp;LD_LIBRARY_PATH=/opt/apple/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04/usr/lib/swift/linux:$LD_LIBRARY_PATH swift printdate.swift</font></div><div class=""><font face="monospace, monospace" class="">&lt;-- this is a blank line emitted by the first print(), which it should not be --&gt;</font></div><div class=""><font face="monospace, monospace" class="">Dec 11, 2015, 6:52:33 PM</font></div></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class="">Thanks for any insight and if I need to file a bug report I am happy to help,</div><div class="">Joe</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Dec 11, 2015 at 10:59 AM, Tony Parker <span dir="ltr" class="">&lt;<a href="mailto:anthony.parker@apple.com" target="_blank" class="">anthony.parker@apple.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi Joe,<div class=""><br class=""></div><div class="">Try this as a workaround: Set the LD_LIBRARY_PATH environment variable to $INSTALLED_LOCATION_OF_SWIFT/usr/lib/swift/linux</div><div class=""><div class=""><br class=""></div><div class="">This should only affect the REPL and not compiled code.</div><div class=""><br class=""></div><div class="">I think this is supposed to be fixed in the top of tree Swift but not in the Dec 1 binary drop.</div><div class=""><br class=""></div><div class="">- Tony</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On Dec 11, 2015, at 5:54 AM, Joseph Bell via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a>&gt; wrote:</div><br class=""></div></div><div class=""><div class=""><div class="h5"><div dir="ltr" class="">All,<div class=""><br class=""></div><div class="">Howdy.&nbsp; I am using swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04 that was released on December 1.&nbsp; The following code:</div><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">import Foundation</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">let dateFormatter = NSDateFormatter()</font></div><div class=""><font face="monospace, monospace" class="">dateFormatter.dateFormat = "dd-MM-yyyy"</font></div><div class=""><font face="monospace, monospace" class="">let dateStr = dateFormatter.stringFromDate(NSDate())</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">print(dateStr)</font></div><div class=""><br class=""></div></div><div class="">results in&nbsp;<br class=""></div><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">LLVM ERROR: Program used external function '_TFC10Foundation6NSDateCfT_S0_' which could not be resolved!</font></div></div><div class=""><br class=""></div><div class="">when executed with the swift driver, and then when compiled with swiftc the print statement just gives a blank newline.</div><div class=""><br class=""></div><div class="">I don't know if this is a known issue (I haven't found any reference on the status page or elsewhere indicating this was unimplemented), or I have an environmental problem.</div><div class=""><br class=""></div><div class="">Thoughts?</div><div class=""><br class=""></div><div class="">Joe</div><div class=""><br class=""></div></div>
</div></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=U7z7oSqRMSwdl2rYt9JJ4zIFaeg4R-2FxExg9xndDuCbySwgGYpkPdKzLGU7ePNxKpsfOmkLNqUAao99PL6rC4U7UnIZWkeW1dTrUTRN-2Fprlm6sAlFjTqGe1b44JfhsB5HKOpfiG1rn-2Flaq8phZ5GCEHFk4WmEfHoDWOVUm1pANL2CXFB97i5Rkkcl9cWEp1BU4DWpPo8nEe7BTK8AnYSNEEzIsfXrql6FBdkAkB3zZK0-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important" class="">
_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>