[Accepted] SE-0285: Ease the transition to concise magic file strings

Hello Swift Community,

The review for SE-0285: Ease the transition to concise magic file strings ran from June 6th through June 16th, 2020. You can find the review thread here.

The feedback was generally positive, and to address the concern around which variants of #file library authors should use the proposal was modified to include Swift API Design Guidelines amendment encouraging library authors to prefer #fileID over alternatives.

Accordingly, SE-0285 is accepted .

Thank you to everyone who participated in the review!

Tom Doron,
Review Manager

5 Likes

Can we please fix the title of this thread?

3 Likes

Fixed!

3 Likes

I note that this accepted and implemented proposal states the following...

Standard library assertion functions like assert , precondition , and fatalError will switch from #file to #fileID . When a filename is included in a compiler-generated trap, such as a force unwrap, it will also emit a literal equivalent to using #fileID .

However in Swift 5.3 I still see assert and friends using #file? Was this aspect of the proposal deferred or forgotten? ...or am I missing it on my end?

This is complicating our attempt to move over to use #fileID in some of our code.