From addd1381e5629bdf80af798518a9ea48d7e11cd9 Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Wed, 5 Nov 2025 14:37:52 -0800 Subject: [PATCH 1/4] moving adding dependencies into folder with other dependency content to make it easier to find for editing - doesn't effect display or layout --- .../Documentation.docc/{ => Dependencies}/AddingDependencies.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Sources/PackageManagerDocs/Documentation.docc/{ => Dependencies}/AddingDependencies.md (100%) diff --git a/Sources/PackageManagerDocs/Documentation.docc/AddingDependencies.md b/Sources/PackageManagerDocs/Documentation.docc/Dependencies/AddingDependencies.md similarity index 100% rename from Sources/PackageManagerDocs/Documentation.docc/AddingDependencies.md rename to Sources/PackageManagerDocs/Documentation.docc/Dependencies/AddingDependencies.md From b81497f9c101d1dc71abc8aba7edd402812d8777 Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Wed, 5 Nov 2025 14:38:51 -0800 Subject: [PATCH 2/4] removing legacy note from main page of docs --- Sources/PackageManagerDocs/Documentation.docc/Documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/PackageManagerDocs/Documentation.docc/Documentation.md b/Sources/PackageManagerDocs/Documentation.docc/Documentation.md index 53f1477d288..aec3179424e 100644 --- a/Sources/PackageManagerDocs/Documentation.docc/Documentation.md +++ b/Sources/PackageManagerDocs/Documentation.docc/Documentation.md @@ -14,7 +14,7 @@ The Swift Package Manager lets you share your code as a package, depend on and u ### Essentials -- +- - - From b5b7d143a5b98458639992848d57f6b5ca3b1212 Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Wed, 5 Nov 2025 14:39:27 -0800 Subject: [PATCH 3/4] cross linking into PackageDescription API docs for Products, Dependencies, and Targets --- .../Documentation.docc/IntroducingPackages.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/PackageManagerDocs/Documentation.docc/IntroducingPackages.md b/Sources/PackageManagerDocs/Documentation.docc/IntroducingPackages.md index 92017805b15..10c96815564 100644 --- a/Sources/PackageManagerDocs/Documentation.docc/IntroducingPackages.md +++ b/Sources/PackageManagerDocs/Documentation.docc/IntroducingPackages.md @@ -7,17 +7,17 @@ Learn to create and use a Swift package. A package consists of a `Package.swift` manifest file along with source files, resources, and other assets. The manifest file, or package manifest, defines the package's name and its contents using the [PackageDescription](https://developer.apple.com/documentation/packagedescription) module. -Each package declares `Products`, a list of what the package produces. +Each package declares [Products](https://docs.swift.org/swiftpm/documentation/packagedescription/product), a list of what the package produces. Types of products include libraries, executables, and plugins: - A library defines one or more modules that can be imported by other code. - An executable is a program that can be run by the operating system. - A plugin is executable code that the Swift Package Manager may use to provide additional commands or build capabilities. -A package may declare `Dependencies`, that provide products from other Swift packages. +A package may declare [Dependencies](https://docs.swift.org/swiftpm/documentation/packagedescription/package/dependency), that provide products from other Swift packages. A dependency may also be defined to a system library or binary (non-source) artifact. -Each product is made up of one or more `Targets`, the basic building block of a Swift package. +Each product is made up of one or more [Targets](https://docs.swift.org/swiftpm/documentation/packagedescription/target), the basic building block of a Swift package. Each target specifies an module, may declare one or more dependencies on other targets within the same package and on products vended by the package’s dependencies. A target may define a library, a test suite, an executable, an macro, a binary file, and so on. From 0a59b5a5aa4e0d4fc47c0375c8bebeb847c5e72c Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Wed, 5 Nov 2025 14:54:51 -0800 Subject: [PATCH 4/4] extend Target documentation to provide caution around accidentally linking testing libraries into executables --- .../PackageDescription.docc/Curation/Target.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/Runtimes/PackageDescription/PackageDescription.docc/Curation/Target.md b/Sources/Runtimes/PackageDescription/PackageDescription.docc/Curation/Target.md index bd4b65b2022..5f9676ffab1 100644 --- a/Sources/Runtimes/PackageDescription/PackageDescription.docc/Curation/Target.md +++ b/Sources/Runtimes/PackageDescription/PackageDescription.docc/Curation/Target.md @@ -1,5 +1,11 @@ # ``PackageDescription/Target`` +### Test Libraries Targets + +Built-in testing libraries, such as Swift Testing and XCTest, are only available for use in certain runtime contexts. +While you can link to the them targets, in order to modularly provide additional testing capabilities, take care to only link them to test targets (``TargetType/test``). +Including testing libraries, as direct or transitive dependencies, can cause clients to encounter linking issues. + ## Topics ### Naming the Target