Skip to content

Commit 7a3cc4c

Browse files
committed
Enable package access in 5.9
1 parent 78cceb7 commit 7a3cc4c

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

Fixtures/Miscellaneous/PackageNameFlag/appPkg/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:999.0
1+
// swift-tools-version:5.9
22
import PackageDescription
33

44
let package = Package(

Fixtures/Miscellaneous/PackageNameFlag/fooPkg/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:999.0
1+
// swift-tools-version:5.9
22
import PackageDescription
33

44
let package = Package(

Fixtures/Miscellaneous/TargetPackageAccess/libPkg/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:999.0
1+
// swift-tools-version:5.9
22
import PackageDescription
33

44
let package = Package(

Sources/PackageDescription/Target.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ public final class Target {
568568
/// - swiftSettings: The Swift settings for this target.
569569
/// - linkerSettings: The linker settings for this target.
570570
/// - plugins: The plug-ins used by this target
571-
@available(_PackageDescription, introduced: 999.0)
571+
@available(_PackageDescription, introduced: 5.9)
572572
public static func target(
573573
name: String,
574574
dependencies: [Dependency] = [],
@@ -740,7 +740,7 @@ public final class Target {
740740
/// - swiftSettings: The Swift settings for this target.
741741
/// - linkerSettings: The linker settings for this target.
742742
/// - plugins: The plug-ins used by this target
743-
@available(_PackageDescription, introduced: 999.0)
743+
@available(_PackageDescription, introduced: 5.9)
744744
public static func executableTarget(
745745
name: String,
746746
dependencies: [Dependency] = [],
@@ -986,7 +986,7 @@ public final class Target {
986986
/// - swiftSettings: The Swift settings for this target.
987987
/// - linkerSettings: The linker settings for this target.
988988
/// - plugins: The plug-ins used by this target.
989-
@available(_PackageDescription, introduced: 999.0)
989+
@available(_PackageDescription, introduced: 5.9)
990990
public static func testTarget(
991991
name: String,
992992
dependencies: [Dependency] = [],
@@ -1214,7 +1214,7 @@ public final class Target {
12141214
/// - sources: The source files in the plug-in target.
12151215
/// - packageAccess: Allows access to package symbols from other targets in the package.
12161216
/// - Returns: A `Target` instance.
1217-
@available(_PackageDescription, introduced: 999.0)
1217+
@available(_PackageDescription, introduced: 5.9)
12181218
public static func plugin(
12191219
name: String,
12201220
capability: PluginCapability,

Sources/PackageModel/PackageModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ extension Manifest {
125125
return self.toolsVersion >= .v5_8
126126
}
127127
public var usePackageNameFlag: Bool {
128-
return self.toolsVersion >= .vNext
128+
return self.toolsVersion >= .v5_9
129129
}
130130
}
131131

Tests/BuildTests/BuildPlanTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ final class BuildPlanTests: XCTestCase {
552552
if isFlagSupportedInDriver {
553553
XCTAssertMatch(stdout, .contains("-package-name apppkg"))
554554
XCTAssertMatch(stdout, .contains("-package-name foopkg"))
555-
// the flag is not supported in old toolsversions
555+
// the flag is not supported if < 5.9
556556
XCTAssertNoMatch(stdout, .contains("-package-name barpkg"))
557557
} else {
558558
XCTAssertNoMatch(stdout, .contains("-package-name"))

0 commit comments

Comments
 (0)