bobergj
(Jonas)
1
https://github.com/apple/swift-evolution/blob/main/proposals/0285-ease-pound-file-transition.md#detailed-design 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 .
But in Swift 5.6, and on the main branch, these functions still have a default argument of #file: https://github.com/apple/swift/blob/main/stdlib/public/core/Assert.swift
Is this an oversight or is it intentional - and instead this change will simply be realized with the change of behaviour of #file in a Swift 6 compiler mode?
1 Like
The standard library is using a compiler flag, to alias #file as #fileID.
I presume that standard library APIs can now be updated.
Or we could wait until Swift 6, as you suggested.