Skip to content

Swift 5.9 release blog post #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Sep 18, 2023
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
113c1bf
add first blog post draft
alexandersandberg Aug 29, 2023
2f8aa20
include SE-0386 in evolutions appendix
alexandersandberg Aug 29, 2023
1f9e12f
add c++ interoperability section
alexandersandberg Aug 29, 2023
40d1057
Update 2023-08-29-swift-5.9-released.md (#374)
tomerd Aug 30, 2023
cf20b9a
update debugging section
alexandersandberg Aug 30, 2023
7518f22
update swift syntax section
alexandersandberg Aug 30, 2023
e1bc48b
add language and standard library section
alexandersandberg Sep 2, 2023
9bf6871
fix casing of section title
alexandersandberg Sep 2, 2023
d147e4a
Add a Crash Handling subsection. (#376)
al45tair Sep 4, 2023
1171ead
remove completed TODOs
alexandersandberg Sep 5, 2023
dd2d3a1
add details element to hide code snippet
alexandersandberg Sep 5, 2023
8e492da
add SE-0395 to evolutions list
alexandersandberg Sep 5, 2023
0fa3a86
Remove promise of a future blog post. (#381)
al45tair Sep 7, 2023
79798f7
Update _posts/2023-08-29-swift-5.9-released.md
tomerd Sep 8, 2023
06e45f4
Updates to the 5.9 blog post draft. (#398)
hborla Sep 11, 2023
c2af136
Editorial pass for more consistent language and section structure.
hborla Sep 11, 2023
9fe1cc8
Update _posts/2023-08-29-swift-5.9-released.md
tomerd Sep 12, 2023
a183a95
Update _posts/2023-08-29-swift-5.9-released.md
tomerd Sep 12, 2023
019cfc3
Update _posts/2023-08-29-swift-5.9-released.md
tomerd Sep 12, 2023
0121079
use smart quotes
alexandersandberg Sep 14, 2023
da1c493
address PR feedback
alexandersandberg Sep 14, 2023
475a1d7
Improvements to the release blog post introduction.
hborla Sep 15, 2023
2d316a2
Improve the framing of the language introduction, and flip the order of
hborla Sep 15, 2023
3e08eb3
Minor editorial changes in the debugging section.
hborla Sep 15, 2023
2eb95ab
Minor editorial changes in the Swift Syntax section.
hborla Sep 15, 2023
902fa61
Editorial changes for the Swift Package Manager section.
hborla Sep 15, 2023
03ae353
Re-combine the bullet point about SE-0391 and signed packages. Signed
hborla Sep 15, 2023
4bb86ae
Lift up C++ interop to the top of the Ecosystem section.
hborla Sep 15, 2023
b038546
Update _posts/2023-08-29-swift-5.9-released.md
hborla Sep 15, 2023
dc5f3f2
Update _posts/2023-08-29-swift-5.9-released.md
hborla Sep 15, 2023
7d2f70a
Add a code example of Swift-C++ interop.
hborla Sep 15, 2023
667bbf1
Show an API before and after parameter packs to demonstrate reducing …
hborla Sep 15, 2023
5f81630
Editorial changes to the Windows section.
hborla Sep 15, 2023
4f13f19
More editorial changes for the language section.
hborla Sep 15, 2023
ccc6457
Add subheaders to the Language section
cthielen Sep 15, 2023
d894100
Add macro examples
cthielen Sep 15, 2023
5838920
Minor tweaks to the C++ example flow
cthielen Sep 15, 2023
6ef669d
Use consistent formatting for code examples.
hborla Sep 16, 2023
57a95c8
Add a Next Steps section at the end of the post.
hborla Sep 16, 2023
2aa7d5d
Address the outstanding review feedback.
hborla Sep 16, 2023
5d9300e
add @hborla to list of authors
alexandersandberg Sep 16, 2023
b7d6c50
Minor tweaks to Language and Standard Library
cthielen Sep 18, 2023
a7ec23f
Minor edits to the remaining sections
cthielen Sep 18, 2023
52a6395
Clarify macro composition refers to developers writing macros, not co…
cthielen Sep 18, 2023
ff49b01
Add example of a parameter pack call-site
cthielen Sep 18, 2023
4eb287a
Add macro examples
cthielen Sep 18, 2023
acd33bb
Update the download section
shahmishal Sep 18, 2023
e709a82
remove TODO
alexandersandberg Sep 18, 2023
210665e
Minor tweaks for readability
cthielen Sep 18, 2023
a9e7450
Add a note about which platforms support macros.
hborla Sep 18, 2023
ad1dbda
Update post date and time
cthielen Sep 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions _posts/2023-08-29-swift-5.9-released.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
layout: post
published: true
date: 2023-08-29 15:00:00
title: Swift 5.9 Released!
author: [alexandersandberg]
---

Swift 5.9 is now officially released! 🎉 <!-- TODO: Summary of what's included in the release -->

Thank you to everyone in the Swift community who made this release possible. Your Swift Forums discussions, bug reports, pull requests, educational content, and other contributions are always appreciated!

<!-- TODO: Link to Swift 5.9 showcase resource -->

[The Swift Programming Language](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/) book has been updated for Swift 5.9 and is now published with DocC. This is the official Swift guide and a great entry point for those new to Swift. The Swift community also maintains a number of [translations](/documentation/#translations).

If you’re new to Swift, [The Swift Programming Language](https://docs.swift.org/swift-book/) is the official Swift guide and has been updated for version 5.9. The Swift community maintains a number of [translations](https://www.swift.org/documentation/#translations).

## Language and Standard Library

<!-- TODO: Add section content -->

You can find the complete list of Swift Evolution proposals that were implemented in Swift 5.9 in the [Swift Evolution Appendix](#swift-evolution-appendix) below.

## Developer Experience

<!-- TODO: Add more sections with content? -->

### Debugging

New features have been introduced to [LLDB](https://lldb.llvm.org/ "LLDB project home page") and the Swift compiler to improve the debugging experience, including faster `p` and `po` and use of generic type parameters in expressions.

Learn more in this dedicated blog post: [What’s new in Swift debugging on the 5.9 branch?](#). <!-- TODO: add link to blog post once it's published -->

## Ecosystem

<!-- TODO: Add more sections with content? -->

### Swift Package Manager

Following are some highlights from the changes introduced to the [Swift Package Manager](https://github.com/apple/swift-package-manager) in Swift 5.9:

- SwiftPM packages can now use `package` as a new access modifier, allowing accessing symbols in another target / module within the same package without making it public.

- New `swift experimental-sdk` experimental command is now available for managing Swift SDK bundles that follow the format described in [SE-0387](https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md).

- SwiftPM can now publish to a registry following the publishing spec as defined in [SE-0391](https://github.com/apple/swift-evolution/blob/main/proposals/0391-package-registry-publish.md). SwiftPM also gains support for signed packages. Trust-on-first-use (TOFU) check which includes only fingerprints (e.g., checksums) previously has been extended to include signing identities, and it is enforced for source archives as well as package manifests.

- Add a new `CompilerPluginSupport` module which contains the definition for macro targets. Macro targets allow authoring and distribution of custom Swift macros such as [expression macros](https://github.com/apple/swift-evolution/blob/main/proposals/0382-expression-macros.md).

See the [Swift Package Manager changelog](https://github.com/apple/swift-package-manager/blob/main/CHANGELOG.md#swift-59) for the complete list of changes.

### SwiftSyntax

[SwiftSyntax](https://github.com/apple/swift-syntax) has become an essential tool to create macros in Swift 5.9. In addition to the introduction of the modules that allow the creation of macros, SwiftSyntax has received huge focus on quality:

- The documentation of SwiftSyntax has been greatly expanded and can be viewed at [swiftpackageindex.com](https://swiftpackageindex.com/apple/swift-syntax)

- The names of all syntax nodes and their children have been audited to be more consistent and accurately reflect the Swift language.

- The error messages produced by the new SwiftParser have been greatly improved and it now produces better errors than the C++ parser in almost all cases.

- As part of the Google Summer of Code project, incremental parsing has been introduced to SwiftSyntax, allowing e.g. an editor to only reparse those parts of a syntax tree that have changed.

Over the last year, SwiftSyntax has been a huge success as an open source project. Since the release of Swift 5.8, more than 30 distinct open source contributors have contributed to the package accounting for more than 30% of the commits. And community tools like [swift-ast-explorer.com](https://swift-ast-explorer.com) are an invaluable tool to explore and understand the SwiftSyntax tree. Thanks to everyone who contributed!

### Windows Platform

<!-- TODO: Add section content -->

## Downloads

<!-- TODO: Add section content -->

## Swift Evolution Appendix

The following language, standard library, and Swift Package Manager proposals were accepted through the [Swift Evolution](https://github.com/apple/swift-evolution) process and [implemented in Swift 5.9](https://apple.github.io/swift-evolution/#?version=5.9).

- SE-0366: [`consume` operator to end the lifetime of a variable binding](https://github.com/apple/swift-evolution/blob/main/proposals/0366-move-function.md)
- SE-0374: [Add sleep(for:) to Clock](https://github.com/apple/swift-evolution/blob/main/proposals/0374-clock-sleep-for.md)
- SE-0377: [`borrowing` and `consuming` parameter ownership modifiers](https://github.com/apple/swift-evolution/blob/main/proposals/0377-parameter-ownership-modifiers.md)
- SE-0380: [`if` and `switch` expressions](https://github.com/apple/swift-evolution/blob/main/proposals/0380-if-switch-expressions.md)
- SE-0381: [DiscardingTaskGroups](https://github.com/apple/swift-evolution/blob/main/proposals/0381-task-group-discard-results.md)
- SE-0382: [Expression Macros](https://github.com/apple/swift-evolution/blob/main/proposals/0382-expression-macros.md)
- SE-0384: [Importing Forward Declared Objective-C Interfaces and Protocols](https://github.com/apple/swift-evolution/blob/main/proposals/0384-importing-forward-declared-objc-interfaces-and-protocols.md)
<!-- TODO: include this one? - SE-0386: [New access modifier: `package`](https://github.com/apple/swift-evolution/blob/main/proposals/0386-package-access-modifier.md) -->
- SE-0388: [Convenience Async[Throwing]Stream.makeStream methods](https://github.com/apple/swift-evolution/blob/main/proposals/0388-async-stream-factory.md)
- SE-0389: [Attached Macros](https://github.com/apple/swift-evolution/blob/main/proposals/0389-attached-macros.md)
- SE-0390: [Noncopyable structs and enums](https://github.com/apple/swift-evolution/blob/main/proposals/0390-noncopyable-structs-and-enums.md)
- SE-0392: [Custom Actor Executors](https://github.com/apple/swift-evolution/blob/main/proposals/0392-custom-actor-executors.md)
- SE-0393: [Value and Type Parameter Packs](https://github.com/apple/swift-evolution/blob/main/proposals/0393-parameter-packs.md)
- SE-0394: [Package Manager Support for Custom Macros](https://github.com/apple/swift-evolution/blob/main/proposals/0394-swiftpm-expression-macros.md)
- SE-0396: [Conform `Never` to `Codable`](https://github.com/apple/swift-evolution/blob/main/proposals/0396-never-codable.md)
- SE-0397: [Freestanding Declaration Macros](https://github.com/apple/swift-evolution/blob/main/proposals/0397-freestanding-declaration-macros.md)
- SE-0398: [Allow Generic Types to Abstract Over Packs](https://github.com/apple/swift-evolution/blob/main/proposals/0398-variadic-types.md)
- SE-0399: [Tuple of value pack expansion](https://github.com/apple/swift-evolution/blob/main/proposals/0399-tuple-of-value-pack-expansion.md)
- SE-0400: [Init Accessors](https://github.com/apple/swift-evolution/blob/main/proposals/0400-init-accessors.md)
- SE-0401: [Remove Actor Isolation Inference caused by Property Wrappers](https://github.com/apple/swift-evolution/blob/main/proposals/0401-remove-property-wrapper-isolation.md)
- SE-0402: [Generalize `conformance` macros as `extension` macros](https://github.com/apple/swift-evolution/blob/main/proposals/0402-extension-macros.md)