Skip to content

Commit 41d0dc5

Browse files
authored
Docs/interoperability mode (#8902)
Adds in abstracts and documentation for interoperability mode ref: rdar://136526756 ### Motivation: InteroperabilityMode was missing abstracts within PackageDescription. ### Modifications: Added abstracts to provide consistency, re-curated (organized) the SwiftSettings into more readable sections, and changed a few local doc references to Xcode documentation into HTML links to support external rendering without warnings. ### Result: Interoperability has documentation, and the SwiftSettings has been re-organized. The doc build runs locally without warnings.
1 parent 9633b41 commit 41d0dc5

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed

Sources/PackageDescription/BuildSettings.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,12 +575,15 @@ public struct SwiftSetting: Sendable {
575575
name: "strictMemorySafety", value: ["ON"], condition: condition)
576576
}
577577

578+
/// The interoperability mode
578579
public enum InteroperabilityMode: String {
580+
/// Emit code compatible with being imported from C and Objective-C.
579581
case C
582+
/// Emit code compatible with being imported from C++ and Objective-C++.
580583
case Cxx
581584
}
582585

583-
/// Enable Swift interoperability with a given language.
586+
/// Enables Swift interoperability with a given language.
584587
///
585588
/// This is useful for enabling interoperability between Swift and C++ for
586589
/// a given target.
@@ -591,7 +594,7 @@ public struct SwiftSetting: Sendable {
591594
/// - Since: First available in PackageDescription 5.9.
592595
///
593596
/// - Parameters:
594-
/// - mode: The language mode, either C or Cxx.
597+
/// - mode: The interoperability mode, either C-compatible or C++-compatible.
595598
/// - condition: A condition that restricts the application of the build
596599
/// setting.
597600
@available(_PackageDescription, introduced: 5.9)

Sources/PackageDescription/PackageDescription.docc/Curation/SwiftSetting.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,28 @@
66

77
- ``define(_:_:)``
88
- ``unsafeFlags(_:_:)``
9-
- ``strictMemorySafety(_:)``
9+
- ``treatAllWarnings(as:_:)``
10+
- ``treatWarning(_:as:_:)``
11+
12+
### Configuring Swift Language Mode
13+
1014
- ``swiftLanguageMode(_:_:)``
15+
16+
### Configuring Swift Concurrency
17+
18+
- ``strictMemorySafety(_:)``
1119
- ``defaultIsolation(_:_:)``
20+
21+
### Configuring Swift Experimental and Upcoming Features
22+
1223
- ``enableExperimentalFeature(_:_:)``
1324
- ``enableUpcomingFeature(_:_:)``
25+
26+
### Configuring Swift Interoperability
27+
1428
- ``interoperabilityMode(_:_:)``
1529
- ``InteroperabilityMode``
30+
31+
### Deprecated configurations
32+
1633
- ``swiftLanguageVersion(_:_:)``

Sources/PackageDescription/Resource.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
/// Alternatively, exclude resource files from a target by passing them to the
3131
/// target initializer's ``Target/exclude`` parameter.
3232
///
33-
/// To learn more about package resources, see
34-
/// <doc:bundling-resources-with-a-swift-package>.
33+
/// 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).
3534
@available(_PackageDescription, introduced: 5.3)
3635
public struct Resource: Sendable {
3736

Sources/PackageDescription/Target.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ public final class Target {
210210
/// package compute-checksum path/to/MyFramework.zip` at the command line to
211211
/// make sure you create a correct SHA256 checksum.
212212
///
213-
/// For more information, see
214-
/// <doc:distributing-binary-frameworks-as-swift-packages>.
213+
/// For more information, see [Distributing binary frameworks as Swift packages](https://developer.apple.com/documentation/xcode/distributing-binary-frameworks-as-swift-packages).
215214
@available(_PackageDescription, introduced: 5.3)
216215
public var checksum: String?
217216

0 commit comments

Comments
 (0)