Issue #111 14 Jun 2018
Written by: Roman Volkov
Hi there SwiftWeekly readers! The last two weeks were full of exciting news with WWDC, interesting discussions on the Swift Unwrapped podcast and there’s plenty of new starter tasks for you, especially for SPM. Enjoy!
- SR-7823 [Package Manager] swift run intermingles SwiftPM status with tool output on stdout
- SR-7824 [Package Manager] SwiftPM ignores missing source symlinks
- SR-7825 [Package Manager] SwiftPM should consider a target with header files but no sources as a ClangTarget
- SR-7826 [Package Manager] SwiftPM should warn if it skips traversing a symlink which would contain sources in it
- SR-7829 [Package Manager] Bad error message when a tag doesn’t exist
- SR-7904 [Compiler] AST dump - can’t distinguish files
- SR-7933 [Tooling] SourceKit double-counts escaping and autoclosure attributes
- SR-7979 [Package Manager] Circular Dependency in SwiftPM Causes Segfault
News and community
The biggest news from the past two weeks is, of course, WWDC. There are plenty of videos to watch, but take a closer look into these Swift related videos:
- What’s New in Swift
- Swift Generics
- Getting to Know Swift Package Manager
- Behind the Scenes of the Xcode Build Process
Greg Heo wrote a new post on Swift Unboxed, Swift Diagnostics: #warning and #error, about the new
#error directive implementations.
Commits and pull requests
Inherited designated initializers got the same availability as the corresponding initialier in the superclass. However if the superclass was more available than the subclass, we would generate a diagnostic that a member cannot be more available than its containing type. This diagnostic had an unknown source location, since the location was for a synthesized declaration, causing confusion.
Proposals in review
Neveris very useful for representing impossible code. Most people are familiar with it as the return type of functions like
Neveris also useful when working with generic classes.
For example, a
Resulttype might use
Valueto represent something that always errors or use
Errorto represent something that never errors.
Conditional conformances to
Hashableare also very useful when working with
enums so you can test easily or work with collections.
But those don’t play well together. Without conformance to
Neverdisqualifies your generic type from being
This proposal is a follow-on to SE-0195 - Introduce User-defined “Dynamic Member Lookup” Types which shipped in Swift 4.2. It introduces a new
@dynamicCallableattribute, which marks a type as being “callable” with normal syntax.
And finally — time to get some rest!