From ec7efd8983bb3e6f32438bda33ab9ab84e634cd8 Mon Sep 17 00:00:00 2001 From: Alex Martini Date: Tue, 18 Nov 2025 11:17:03 -0800 Subject: [PATCH 1/2] Update deprecations that are errors in Swift 6 Confirmed the compiler error on Xcode 26.1 (17B55). For a new Xcode project, Swift 5 language mode is the default, and only produces a warning, so you also have to change that setting when testing. --- Style.md | 10 ++++++++++ TSPL.docc/ReferenceManual/Attributes.md | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Style.md b/Style.md index 66a56d43c..9c1711334 100644 --- a/Style.md +++ b/Style.md @@ -148,6 +148,16 @@ Use wording and markup like the following: > using this attribute will be an error. ``` +And when it becomes an error: + +``` +> Deprecated: +> This attribute is deprecated; +> use the attribute instead. +> In Swift 6, +> using this attribute produces a compile-time error. +``` + ## definite initialization Not “definitive initialization”. diff --git a/TSPL.docc/ReferenceManual/Attributes.md b/TSPL.docc/ReferenceManual/Attributes.md index 43c229d9d..b7e8fd4b8 100644 --- a/TSPL.docc/ReferenceManual/Attributes.md +++ b/TSPL.docc/ReferenceManual/Attributes.md @@ -1241,7 +1241,7 @@ for a method marked with the `objc` attribute. > This attribute is deprecated; > use the attribute instead. > In Swift 6, -> using this attribute will be an error. +> using this attribute produces a compile-time error. Apply this attribute to a class to indicate that it's the app delegate. @@ -2520,7 +2520,7 @@ The imported module must be compiled with testing enabled. > This attribute is deprecated; > use the attribute instead. > In Swift 6, -> using this attribute will be an error. +> using this attribute produces a compile-time error. Apply this attribute to a class to indicate that it's the app delegate. From d4c6b3588aade4303621ee31d3bd8d4f1c159e66 Mon Sep 17 00:00:00 2001 From: Alex Martini Date: Wed, 19 Nov 2025 15:14:14 -0800 Subject: [PATCH 2/2] List the deprecated attributes last --- TSPL.docc/ReferenceManual/Declarations.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TSPL.docc/ReferenceManual/Declarations.md b/TSPL.docc/ReferenceManual/Declarations.md index 84c929c0e..c85419cb7 100644 --- a/TSPL.docc/ReferenceManual/Declarations.md +++ b/TSPL.docc/ReferenceManual/Declarations.md @@ -58,11 +58,11 @@ The Swift code you compile to make an executable can contain at most one of the following approaches to mark the top-level entry point, regardless of how the code is organized into files and modules: +a file that contains top-level executable code, +a `main.swift` file, the `main` attribute, the `NSApplicationMain` attribute, -the `UIApplicationMain` attribute, -a `main.swift` file, -or a file that contains top-level executable code. +or the `UIApplicationMain` attribute. > Grammar of a top-level declaration: >