Skip to content

Commit 06e45f4

Browse files
authored
Updates to the 5.9 blog post draft. (#398)
* 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.
1 parent 79798f7 commit 06e45f4

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

_posts/2023-08-29-swift-5.9-released.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@ title: Swift 5.9 Released!
66
author: [alexandersandberg]
77
---
88

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.
1010

1111
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!
1212

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

1515
[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).
1616

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-
1917
## Language and Standard Library
2018

2119
Swift 5.9 tackles three long-desired features that allow you to express things you couldn't easily do before.
@@ -77,7 +75,7 @@ func all<each Wrapped>(_ optional: repeat (each Wrapped)?) -> (repeat each Wrapp
7775

7876
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.
7977

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:
8179

8280
```swift
8381
statusBar.text = if !hasConnection { "Disconnected" }
@@ -107,7 +105,7 @@ Swift expressions can now refer to generic type parameters. This allows setting
107105

108106
Finally, the debug info produced by the Swift compiler is now more precise when it comes to scoping of local variables.
109107

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!
111109

112110
## Ecosystem
113111

@@ -137,9 +135,9 @@ See the [Swift Package Manager changelog](https://github.com/apple/swift-package
137135

138136
### Swift Syntax
139137

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:
141139

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).
143141

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

@@ -163,7 +161,15 @@ The server workgroup has been busy driving the adoption of Swift concurrency in
163161

164162
### Windows Platform
165163

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.
167173

168174
## Downloads
169175

0 commit comments

Comments
 (0)