From 5ed084ea1751b1d07c3f1dc9ca4130fc945f2e87 Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 7 Jul 2025 13:44:11 -0700 Subject: [PATCH 1/5] add abstracts for interoperability mode --- Sources/PackageDescription/BuildSettings.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/PackageDescription/BuildSettings.swift b/Sources/PackageDescription/BuildSettings.swift index c6d7d3653ff..cdcf240c47e 100644 --- a/Sources/PackageDescription/BuildSettings.swift +++ b/Sources/PackageDescription/BuildSettings.swift @@ -575,12 +575,15 @@ public struct SwiftSetting: Sendable { name: "strictMemorySafety", value: ["ON"], condition: condition) } + /// The interoperability mode public enum InteroperabilityMode: String { + /// Interoperate as C case C + /// Interoperate as Cxx case Cxx } - /// Enable Swift interoperability with a given language. + /// Enables Swift interoperability with a given language. /// /// This is useful for enabling interoperability between Swift and C++ for /// a given target. From ba1c558d766fdf2901cff8f5c95638cd86519481 Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 7 Jul 2025 13:44:32 -0700 Subject: [PATCH 2/5] fix doc reference to external arguments to HTML links --- Sources/PackageDescription/Resource.swift | 3 +-- Sources/PackageDescription/Target.swift | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Sources/PackageDescription/Resource.swift b/Sources/PackageDescription/Resource.swift index dfd9272793f..17ebcff0283 100644 --- a/Sources/PackageDescription/Resource.swift +++ b/Sources/PackageDescription/Resource.swift @@ -30,8 +30,7 @@ /// Alternatively, exclude resource files from a target by passing them to the /// target initializer's ``Target/exclude`` parameter. /// -/// To learn more about package resources, see -/// . +/// To learn more about package resources, see [Bundling resources as a Swift Package](https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package). @available(_PackageDescription, introduced: 5.3) public struct Resource: Sendable { diff --git a/Sources/PackageDescription/Target.swift b/Sources/PackageDescription/Target.swift index cca6fde7b04..9c7183a82f4 100644 --- a/Sources/PackageDescription/Target.swift +++ b/Sources/PackageDescription/Target.swift @@ -210,8 +210,7 @@ public final class Target { /// package compute-checksum path/to/MyFramework.zip` at the command line to /// make sure you create a correct SHA256 checksum. /// - /// For more information, see - /// . + /// For more information, see [Distributing binary frameworks as Swift packages](https://developer.apple.com/documentation/xcode/distributing-binary-frameworks-as-swift-packages). @available(_PackageDescription, introduced: 5.3) public var checksum: String? From 4446102ad035e84a801aecdd58b1ecd93e94df74 Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 7 Jul 2025 13:44:49 -0700 Subject: [PATCH 3/5] recurate the build settings --- .../Curation/SwiftSetting.md | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Sources/PackageDescription/PackageDescription.docc/Curation/SwiftSetting.md b/Sources/PackageDescription/PackageDescription.docc/Curation/SwiftSetting.md index e6b4606f92d..49f53497caa 100644 --- a/Sources/PackageDescription/PackageDescription.docc/Curation/SwiftSetting.md +++ b/Sources/PackageDescription/PackageDescription.docc/Curation/SwiftSetting.md @@ -6,11 +6,28 @@ - ``define(_:_:)`` - ``unsafeFlags(_:_:)`` -- ``strictMemorySafety(_:)`` +- ``treatAllWarnings(as:_:)`` +- ``treatWarning(_:as:_:)`` + +### Configuring Swift Language Mode + - ``swiftLanguageMode(_:_:)`` -- ``defaultIsolation(_:_:)`` + +### Configuring Swift Experimental and Upcoming Features + - ``enableExperimentalFeature(_:_:)`` - ``enableUpcomingFeature(_:_:)`` + +### Configuring Swift Interoperability + - ``interoperabilityMode(_:_:)`` - ``InteroperabilityMode`` + +### Configuring Swift Concurrency + +- ``strictMemorySafety(_:)`` +- ``defaultIsolation(_:_:)`` + +### Deprecated configurations + - ``swiftLanguageVersion(_:_:)`` From 2954070693971756fc10c1fbcc3e87b1cda60efb Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Mon, 7 Jul 2025 13:45:15 -0700 Subject: [PATCH 4/5] recurate the build settings --- .../PackageDescription.docc/Curation/SwiftSetting.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/PackageDescription/PackageDescription.docc/Curation/SwiftSetting.md b/Sources/PackageDescription/PackageDescription.docc/Curation/SwiftSetting.md index 49f53497caa..72b364b93c2 100644 --- a/Sources/PackageDescription/PackageDescription.docc/Curation/SwiftSetting.md +++ b/Sources/PackageDescription/PackageDescription.docc/Curation/SwiftSetting.md @@ -13,6 +13,11 @@ - ``swiftLanguageMode(_:_:)`` +### Configuring Swift Concurrency + +- ``strictMemorySafety(_:)`` +- ``defaultIsolation(_:_:)`` + ### Configuring Swift Experimental and Upcoming Features - ``enableExperimentalFeature(_:_:)`` @@ -23,11 +28,6 @@ - ``interoperabilityMode(_:_:)`` - ``InteroperabilityMode`` -### Configuring Swift Concurrency - -- ``strictMemorySafety(_:)`` -- ``defaultIsolation(_:_:)`` - ### Deprecated configurations - ``swiftLanguageVersion(_:_:)`` From 7760e93d55ae5a83654dff75888da3374abf4ebb Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Tue, 8 Jul 2025 09:04:43 -0700 Subject: [PATCH 5/5] spelling out details provided in feedback --- Sources/PackageDescription/BuildSettings.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/PackageDescription/BuildSettings.swift b/Sources/PackageDescription/BuildSettings.swift index cdcf240c47e..0f4074dbef5 100644 --- a/Sources/PackageDescription/BuildSettings.swift +++ b/Sources/PackageDescription/BuildSettings.swift @@ -577,9 +577,9 @@ public struct SwiftSetting: Sendable { /// The interoperability mode public enum InteroperabilityMode: String { - /// Interoperate as C + /// Emit code compatible with being imported from C and Objective-C. case C - /// Interoperate as Cxx + /// Emit code compatible with being imported from C++ and Objective-C++. case Cxx } @@ -594,7 +594,7 @@ public struct SwiftSetting: Sendable { /// - Since: First available in PackageDescription 5.9. /// /// - Parameters: - /// - mode: The language mode, either C or Cxx. + /// - mode: The interoperability mode, either C-compatible or C++-compatible. /// - condition: A condition that restricts the application of the build /// setting. @available(_PackageDescription, introduced: 5.9)