The last two weeks passed quickly. We now have Swift Evolution dashboard working in dark mode. How cool is that?

Great news for server-side folks. We have now Swift tooling for Kubernetes. Now you can orchestrate your server containers using language you know and love.

We’re close again to the Holiday season and there is a special schedule when merge access is locked. I think it’s great to take some time and unplug. I know from myself, it is hard to do it, especially if you’re passionate about a project you’re working on.

Starter tasks

  • SR-13848 [Compiler] Restore Note About Optionality Mismatch in Redeclared Functions Involving IUOs and Optionals.

Commits and pull requests

Holly Borla merged a pull request that implements heuristics for linked operator expressions in the solver proper.

buttaface created a pull request improving Android support - moving to the NDK’s unified sysroot. As well he merged a pull request that adds support for x86_64 arch for Android.

Ben Barham merged a pull reques that adds features file describing new available flags.

Returned proposals

SE-0291 has been returned for revision.

During the review, several community members requested to learn more about the Package Collection data format. The core team felt the proposal should be amended to explicitly call out if the data format is part of the feature specification or not, and provide reasoning for its inclusion or exclusion.

For example, it makes sense for the data format to be included if it is considered a stable API that users may build tools around, and conversely it makes sense to exclude if it is considered a non-stable API that users should not be generated directly.

Proposals in review

SE-0290: Unavailability Condition is under a review.

Swift historically supported the #available condition to check if a specific symbol is available for usage, but not the opposite. In this proposal, we’ll present cases where checking for the unavailability of something is necessary, the ugly workaround needed to achieve it today and how a new #unavailable condition can fix it.

Swift-evolution thread: Discussion thread topic for that proposal

SE-0291: Package Collections is under a review.

This is a proposal for adding support for Package Collections to SwiftPM. A package feed is a curated list of packages and associated metadata which makes it easier to discover an existing package for a particular use case. SwiftPM will allow users to subscribe to these collections, search them via the swift package-collections command-line interface, and will make their contents accessible to any clients of libSwiftPM. This proposal is focused on the shape of the command-line interface and the format of configuration data related to package collections.

Swift Forums

Nicole Jacque described Swift 5.4 release process.

Downloadable snapshots of the Swift 5.4 release branch will be posted regularly as part of continuous integration testing. As support is available, snapshot downloads will be added for newly supported platforms.

Once Swift 5.4 is released, the official final builds will also be posted in addition to the snapshots.

On Dec 14, 2020 the release/5.4 branch will be cut in the swift repository and most related project repositories. This will contain the changes that will be released in Swift 5.4. After the branch is cut, changes can be landed on the branch via pull request if they meet the criteria for the release.

Sam Lazarus pitched a proposal that implements static member lookup on protocol metatypes.

Using static member declarations to provide semantic names for commonly used values is an important tool in API design, reducing type repetition and improving call-site legibility. Currently, when a parameter is generic, there is no effective way to take advantage of these facilities. This proposal aims to relax restrictions on accessing static members via protocol metatypes to afford the same call-site legibility to generic APIs.

Max Desiatov informed that first stable release of SwiftWasm 5.3 is now available.

You may have seen some posts about WebAssembly support in Swift on these forums previously. These were mostly questions and discussions about the toolchain development. Today I’m excited to make an announcement first and foremost for end users of Swift interested in applying it on more platforms.

As a culmination of hard work from many people, the first stable release of SwiftWasm 5.3 is available. It allows you to compile your Swift code to WebAssembly, and to interact with the host WebAssembly environment through libraries that the SwiftWasm team maintains. WebAssembly is supported in all recently released major browsers, which means you can build browser apps written purely in Swift (although some JavaScript glue code invisible to users is required under the hood). Non-browser Wasm hosts are also supported, such as Node.js, Wasmer, or any other WASI-compatible hosts.

Swift on the Server meeting notes:

David Ask shared custom AWS CloudFormation resources and macros using Swift AWS Lambda Runtime.

Anders Bertelrud pitched an idea to add ability to declare executable targets in SwiftPM manifests.

The Swift Package Manager doesn’t currently provide a way for a package manifest to declare that a target is the main module of an executable. Instead, SwiftPM infers this by looking for a source file named main.swift (or main.c , main.cpp , etc) in the source directory of the target. … The most straightforward approach would be allow a target to be marked as executable in the manifest. This could take the form of either a parameter to the target type or a new target type. There is already an established pattern of using the type itself to denote the kind of target being declared (e.g. testTarget as a specialization of target ), so the most natural approach seems to be to add a new executableTarget type for this purpose.

Using a separate target type in the manifest would also support any future differences between the parameters for an executable target and a library target.

Dario Rexin informed about static linking on Linux in Swift 5.3.1.

I am happy to announce that with the release of Swift 5.3.1 statically linking the Swift stdlib components is now fully supported on Linux. This includes linking against Dispatch and the different Foundation components. Additionally building self-contained binaries is now possible by manually adding a few linker flags.

Iskandar Abudiab announced Swiftkube - Swift tooling for Kubernetes.

Swift as a language is among the most pleasant to use and it’s seen many advancements in many areas, including the server-side. What’s been lacking, IMHO, is more work put into the whole cloud native landscape, especially Kubernetes.

I hope Swiftkube will contribute towards gapping this bridge.

Slava Pestov updated us about availability checking for protocol conformances.

I just finished landing a set of changes which fix a hole in Swift’s availability checking model. While this was mostly intended for use by Apple, I feel that it is also worth documenting and communicating to the community since people do ship third-party frameworks that make use of OS availability.

As most of you are aware, Swift’s “availability” feature checks if referenced declarations are going to be available at runtime by comparing the OS version in an @available annotation with the “availability context” of the usage location, which is either the deployment target, an @available annotation on an outer declaration, or an if #available block

Yim Lee informed about SE-0291: Package Collections development.

Chris Lattner updated about protocol-based actor isolation pitch.

Thank you for the discussion in the previous pitch thread. I’ve learned a lot from your feedback and made several major revisions to the proposal, notably:

  • Simplifying the ActorSendable requirement to being a marker protocol, eliminating the possibility of implicit deep copies.
  • Including a ValueSemantic marker protocol as part of the proposal (but I leave it to Dave and other experts to define exactly what that means).
  • Defining away the possibility of “expensive” synthesized cross-actor copies in the face of resilience boundaries and other advanced cases.


Maybe it’s time for a road trip to visit Swift compilers?

Pop Quiz by JP.