<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On 14 Mar 2016, at 12:40, Radosław Pietruszewski via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Agreed. It’s really not useful for anyone to see `/Users/radex/Documents/Projects/MillionDollarAppIdea/` when logging errors or… anything really.</div><div class=""><br class=""></div><div class="">I think a project-relative path should just be the new #file. I’m not even sure the full absolute path is necessary — but if it is, I’d rename it.</div></div></div></blockquote></div><br class="">
I think the biggest part of the problem is that Xcode has no option for building the project with relative file paths.<div class=""><br class=""></div><div class="">If file paths were relative (and `<font face="Menlo" class="">$PWD</font>` were set to the project root—like it indeed is!) then `<font face="Menlo" class="">#file</font>` would be the relative name. Actually, you can try it out, just give `<font face="Menlo" class="">swiftc</font>` a roll yourself!<div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Menlo" class="">$ echo 'print(#file)' > foobar.swift</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">$ swiftc <b class="">foobar.swift</b> -o </font><span style="font-family: Menlo;" class="">foobar &&</span><span style="font-family: Menlo;" class=""> ./foobar</span></div><div class=""><font face="Menlo" class=""><b class="">foobar.swift</b></font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">$ swiftc <b class="">"$PWD"/foobar.swift</b> -o foobar &&</font><span style="font-family: Menlo;" class=""> ./foobar</span></div><div class=""><font face="Menlo" class=""><b class="">/Users/pyrtsa/foobar.swift</b></font></div></blockquote><div class=""><br class=""></div><div class="">— Pyry</div></div></body></html>