You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add initial draft of the Windows section from Saleem.
* Add a draft for the introduction to the 5.9 release blog post.
* Minor editorial pass based on PR feedback.
Copy file name to clipboardExpand all lines: _posts/2023-08-29-swift-5.9-released.md
+14-8Lines changed: 14 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,14 @@ title: Swift 5.9 Released!
6
6
author: [alexandersandberg]
7
7
---
8
8
9
-
Swift 5.9 is now officially released! 🎉 <!-- TODO: Summary of what's included in the release -->
9
+
Swift 5.9 is now officially released! 🎉 Swift 5.9 is the foundation for many long-awaited features that give library authors more expressive power, including a new macro system and parameter packs, improve the debugging experience through enhanced crash logs and new features in LLDB's expression evaluator, Swift Package Manager support for a new `package` access modifier and macro targets, bi-directional interoperability with C++, Windows platform improvements, and more.
10
10
11
11
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!
12
12
13
13
<!-- TODO: Link to Swift 5.9 showcase resource -->
14
14
15
15
[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).
16
16
17
-
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).
18
-
19
17
## Language and Standard Library
20
18
21
19
Swift 5.9 tackles three long-desired features that allow you to express things you couldn't easily do before.
What's more, these features are all usable today in Swift 5.9, but they are not finished growing. Each one is too large to fully implement in a single release; we're excited about what you can already do with them in Swift 5.9, but we're even more excited to have laid the foundations for better things to come.
79
77
80
-
In addition to these major features, Swift 5.9 also includes lots of smaller refinements to the language. The one developers will probably use most often is [`if` and `switch` expressions](https://github.com/apple/swift-evolution/blob/main/proposals/0380-if-switch-expressions.md), which lets you assign the result of a single-expression `if` or `switch` statement to a variable:
78
+
In addition to these major features, Swift 5.9 also includes smaller refinements to the language. The one developers will probably use most often is [`if` and `switch` expressions](https://github.com/apple/swift-evolution/blob/main/proposals/0380-if-switch-expressions.md), which lets you assign the result of a single-expression `if` or `switch` statement to a variable:
@@ -107,7 +105,7 @@ Swift expressions can now refer to generic type parameters. This allows setting
107
105
108
106
Finally, the debug info produced by the Swift compiler is now more precise when it comes to scoping of local variables.
109
107
110
-
For a more detailed discussion and examples of how to use these new features we will be publishing a separate blog focussing on debugging Swift 5.9 next week!
108
+
For a more detailed discussion and examples of how to use these new features, stay tuned for a dedicated blog about debugging in Swift 5.9 coming soon!
111
109
112
110
## Ecosystem
113
111
@@ -137,9 +135,9 @@ See the [Swift Package Manager changelog](https://github.com/apple/swift-package
137
135
138
136
### Swift Syntax
139
137
140
-
[swift-syntax](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, swift-syntax has received huge focus on quality:
138
+
[swift-syntax](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, swift-syntax has received major quality improvements:
141
139
142
-
- The documentation of swift-syntax has been greatly expanded and can be viewed at [swiftpackageindex.com](https://swiftpackageindex.com/apple/swift-syntax)
140
+
- The documentation of swift-syntax has been greatly expanded and can be viewed at [swiftpackageindex.com](https://swiftpackageindex.com/apple/swift-syntax).
143
141
144
142
- The names of all syntax nodes and their children have been audited to be more consistent and accurately reflect the Swift language.
145
143
@@ -163,7 +161,15 @@ The server workgroup has been busy driving the adoption of Swift concurrency in
163
161
164
162
### Windows Platform
165
163
166
-
<!-- TODO: Add section content -->
164
+
The Windows installation received new functionality to inject the module maps via a VFS overlay dynamically rather than needing to modify the Visual Studio installation. This change finally breaks the dependency order for installation. It should now be possible to install either Visual Studio or the Swift toolchain first. Additionally, there should be no need to repair the installation after an upgrade to Visual Studio. As part of the continued refinement to the installer, initial work towards versioning the toolchain installation was merged. This begins laying the foundation for the ability to have multiple parallel toolchain versions installed side-by-side on Windows.
165
+
166
+
Alongside of this improvement of handling of Visual Studio, the Swift toolchain added new flags (`-windows-sdk-root`, `-windows-sdk-version`, `-visualc-tools-root`, `-visualc-tools-version`) to help control the Windows SDK and Visual C++ tools that it builds against. The Windows SDK (`WinSDK`) module also saw improvements in the coverage of the SDK enabling access to a wider set of system APIs. The Visual C++ (`vcruntime`) module was greatly restructured to support C++ interoperability. This change should be generally transparent to existing code.
167
+
168
+
Structured Concurrency is now be significantly more stable on Windows. Unfortunately, this does come at the expense of backtraces as the Windows ABI currently prohibits the necessary optimizations required for the proper implementation of the feature.
169
+
170
+
Improvements to path handling in the LSP and SPM should make both of these tools more robust on Windows. LLDB also saw initial work towards improving support for Windows. It should now be possible to use LLDB on Windows for basic debugging. While still a work in progress, this should significantly improve the developer experience on Windows.
171
+
172
+
Small improvements continue to be made to try to reduce the size of the toolchain. Although the impact of this is minimal, some of the tools are now smaller in size due to more careful curation of linking. This also reduces the number of artifacts that are contained in a toolchain installation.
0 commit comments