[swift-evolution] [Pitch] Introducing #fileName debug identifier

Radosław Pietruszewski radexpl at gmail.com
Mon Mar 14 05:40:01 CDT 2016

Agreed. It’s really not useful for anyone to see `/Users/radex/Documents/Projects/MillionDollarAppIdea/` when logging errors or… anything really.

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.

— Radek

> On 13 Mar 2016, at 18:12, Pierre Monod-Broca via swift-evolution <swift-evolution at swift.org> wrote:
> TLDR: a path relative to the project would be nice.
> I agree an absolute path is often too much. 
> I don't have much file name overlap, but would it happen I reckon I would be glad to be able to differentiate them.
> Pierre
> Le 13 mars 2016 à 05:07, Erica Sadun via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> a écrit :
>>> On Mar 12, 2016, at 8:27 PM, Dmitri Gribenko <gribozavr at gmail.com <mailto:gribozavr at gmail.com>> wrote:
>>> It should be OK to have multiple files with the same name in the
>>> project.  For example, in the Swift compiler we have Decl.cpp in both
>>> Clang and Swift.  It is important to distinguish these in the
>>> assertion messages.
>>> Thus, I'd suggest to consider instead passing the project directory to
>>> the compiler, so that the compiler can provide a file name relative to
>>> the project root.
>> Agreed that name overlap is possible. I tend to use a lot of shared code
>> with "add reference" vs "add file" and relative-to-project-root actually 
>> ends up longer that way than just absolute path.
>> -- Erica
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160314/0c7332a6/attachment.html>

More information about the swift-evolution mailing list