Skip to content

Commit d196d9d

Browse files
hartbitaciidgh
authored andcommitted
Mark all current vNext functionality as 5.3
1 parent 76cb47f commit d196d9d

File tree

15 files changed

+58
-57
lines changed

15 files changed

+58
-57
lines changed

Fixtures/Resources/Localized/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.3
22
import PackageDescription
33

44
let package = Package(

Fixtures/Resources/Simple/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.3
22
import PackageDescription
33

44
let package = Package(

IntegrationTests/Fixtures/BinaryTargets/TestBinary/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.3
22

33
import PackageDescription
44

Sources/PackageDescription/PackageDescription.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public final class Package {
178178
private var _platforms: [SupportedPlatform]?
179179

180180
/// The default localization for resources.
181-
@available(_PackageDescription, introduced: 999)
181+
@available(_PackageDescription, introduced: 5.3)
182182
public var defaultLocalization: LanguageTag? {
183183
get { return _defaultLocalization }
184184
set { _defaultLocalization = newValue }
@@ -298,7 +298,7 @@ public final class Package {
298298
/// - swiftLanguageVersions: The list of Swift versions that this package is compatible with.
299299
/// - cLanguageStandard: The C language standard to use for all C targets in this package.
300300
/// - cxxLanguageStandard: The C++ language standard to use for all C++ targets in this package.
301-
@available(_PackageDescription, introduced: 5, obsoleted: 999)
301+
@available(_PackageDescription, introduced: 5, obsoleted: 5.3)
302302
public init(
303303
name: String,
304304
platforms: [SupportedPlatform]? = nil,
@@ -336,7 +336,7 @@ public final class Package {
336336
/// - swiftLanguageVersions: The list of Swift versions that this package is compatible with.
337337
/// - cLanguageStandard: The C language standard to use for all C targets in this package.
338338
/// - cxxLanguageStandard: The C++ language standard to use for all C++ targets in this package.
339-
@available(_PackageDescription, introduced: 999)
339+
@available(_PackageDescription, introduced: 5.3)
340340
public init(
341341
name: String,
342342
defaultLocalization: LanguageTag? = nil,
@@ -466,7 +466,7 @@ public enum SystemPackageProvider {
466466
///
467467
/// - Parameters:
468468
/// - packages: The list of package names.
469-
@available(_PackageDescription, introduced: 999)
469+
@available(_PackageDescription, introduced: 5.3)
470470
public static func yum(_ packages: [String]) -> SystemPackageProvider {
471471
return ._yumItem(packages)
472472
}

Sources/PackageDescription/SupportedPlatforms.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public struct Platform: Encodable {
4343
public static let android: Platform = Platform(name: "android")
4444

4545
/// The WASI platform
46-
@available(_PackageDescription, introduced: 999.0)
46+
@available(_PackageDescription, introduced: 5.3)
4747
public static let wasi: Platform = Platform(name: "wasi")
4848
}
4949

Sources/PackageDescription/Target.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public final class Target {
7676
public var sources: [String]?
7777

7878
/// The explicit list of resource files in the target.
79-
@available(_PackageDescription, introduced: 999)
79+
@available(_PackageDescription, introduced: 5.3)
8080
public var resources: [Resource]? {
8181
get { _resources }
8282
set { _resources = newValue }
@@ -148,7 +148,7 @@ public final class Target {
148148
private var _linkerSettings: [LinkerSetting]?
149149

150150
/// The binary target's checksum.
151-
@available(_PackageDescription, introduced: 999)
151+
@available(_PackageDescription, introduced: 5.3)
152152
public var checksum: String? {
153153
get { _checksum }
154154
set { _checksum = newValue }
@@ -292,7 +292,7 @@ public final class Target {
292292
/// - cxxSettings: The C++ settings for this target.
293293
/// - swiftSettings: The Swift settings for this target.
294294
/// - linkerSettings: The linker settings for this target.
295-
@available(_PackageDescription, introduced: 5, obsoleted: 999)
295+
@available(_PackageDescription, introduced: 5, obsoleted: 5.3)
296296
public static func target(
297297
name: String,
298298
dependencies: [Dependency] = [],
@@ -344,7 +344,7 @@ public final class Target {
344344
/// - cxxSettings: The C++ settings for this target.
345345
/// - swiftSettings: The Swift settings for this target.
346346
/// - linkerSettings: The linker settings for this target.
347-
@available(_PackageDescription, introduced: 999)
347+
@available(_PackageDescription, introduced: 5.3)
348348
public static func target(
349349
name: String,
350350
dependencies: [Dependency] = [],
@@ -474,7 +474,7 @@ public final class Target {
474474
/// - cxxSettings: The C++ settings for this target.
475475
/// - swiftSettings: The Swift settings for this target.
476476
/// - linkerSettings: The linker settings for this target.
477-
@available(_PackageDescription, introduced: 999)
477+
@available(_PackageDescription, introduced: 5.3)
478478
public static func testTarget(
479479
name: String,
480480
dependencies: [Dependency] = [],
@@ -544,7 +544,7 @@ public final class Target {
544544
/// - name: The name of the target.
545545
/// - url: The URL to the binary artifact. Should point to a `zip` archive containing a `XCFramework`.
546546
/// - checksum: The checksum of the artifact archive for validation.
547-
@available(_PackageDescription, introduced: 999)
547+
@available(_PackageDescription, introduced: 5.3)
548548
public static func binaryTarget(
549549
name: String,
550550
url: String,
@@ -571,7 +571,7 @@ public final class Target {
571571
/// - name: The name of the target.
572572
/// - path: The path to the binary artifact. Can point directly to a `XCFramework` or a zip containing the
573573
/// `XCFramework`.
574-
@available(_PackageDescription, introduced: 999)
574+
@available(_PackageDescription, introduced: 5.3)
575575
public static func binaryTarget(
576576
name: String,
577577
path: String
@@ -647,7 +647,7 @@ extension Target.Dependency {
647647
///
648648
/// - parameters:
649649
/// - name: The name of the target.
650-
@available(_PackageDescription, obsoleted: 999)
650+
@available(_PackageDescription, obsoleted: 5.3)
651651
public static func target(name: String) -> Target.Dependency {
652652
#if PACKAGE_DESCRIPTION_4
653653
return .targetItem(name: name)
@@ -675,7 +675,7 @@ extension Target.Dependency {
675675
///
676676
/// - parameters:
677677
/// - name: The name of the dependency, either a target or a product.
678-
@available(_PackageDescription, obsoleted: 999)
678+
@available(_PackageDescription, obsoleted: 5.3)
679679
public static func byName(name: String) -> Target.Dependency {
680680
#if PACKAGE_DESCRIPTION_4
681681
return .byNameItem(name: name)
@@ -690,7 +690,7 @@ extension Target.Dependency {
690690
/// - parameters:
691691
/// - name: The name of the product.
692692
/// - package: The name of the package.
693-
@available(_PackageDescription, introduced: 5.2, obsoleted: 999)
693+
@available(_PackageDescription, introduced: 5.2, obsoleted: 5.3)
694694
public static func product(
695695
name: String,
696696
package: String
@@ -703,7 +703,7 @@ extension Target.Dependency {
703703
/// - parameters:
704704
/// - name: The name of the target.
705705
/// - condition: The condition under which the dependency is exercised.
706-
@available(_PackageDescription, introduced: 999)
706+
@available(_PackageDescription, introduced: 5.3)
707707
public static func target(name: String, condition: TargetDependencyCondition? = nil) -> Target.Dependency {
708708
return ._targetItem(name: name, condition: condition)
709709
}
@@ -714,7 +714,7 @@ extension Target.Dependency {
714714
/// - name: The name of the product.
715715
/// - package: The name of the package.
716716
/// - condition: The condition under which the dependency is exercised.
717-
@available(_PackageDescription, introduced: 999)
717+
@available(_PackageDescription, introduced: 5.3)
718718
public static func product(
719719
name: String,
720720
package: String,
@@ -729,7 +729,7 @@ extension Target.Dependency {
729729
/// - parameters:
730730
/// - name: The name of the dependency, either a target or a product.
731731
/// - condition: The condition under which the dependency is exercised.
732-
@available(_PackageDescription, introduced: 999)
732+
@available(_PackageDescription, introduced: 5.3)
733733
public static func byName(name: String, condition: TargetDependencyCondition? = nil) -> Target.Dependency {
734734
return ._byNameItem(name: name, condition: condition)
735735
}

Sources/PackageLoading/ManifestLoader.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ private func sandboxProfile(toolsVersion: ToolsVersion, cacheDirectories: [Absol
712712
stream <<< "(import \"system.sb\")" <<< "\n"
713713

714714
// The following accesses are only needed when interpreting the manifest (versus running a compiled version).
715-
if toolsVersion < .vNext {
715+
if toolsVersion < .v5_3 {
716716
// Allow reading all files.
717717
stream <<< "(allow file-read*)" <<< "\n"
718718
// These are required by the Swift compiler.

Sources/PackageLoading/TargetSourcesBuilder.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ public struct TargetSourcesBuilder {
112112
}
113113

114114
// Emit an error if we found files without a matching rule in
115-
// tools version >= vNext. This will be activated once resources
115+
// tools version >= v5_3. This will be activated once resources
116116
// support is complete.
117-
if toolsVersion >= .vNext {
117+
if toolsVersion >= .v5_3 {
118118
let filesWithNoRules = pathToRule.filter { $0.value.rule == .none }
119119
if !filesWithNoRules.isEmpty {
120120
var error = "found \(filesWithNoRules.count) file(s) which are unhandled; explicitly declare them as resources or exclude from the target\n"
@@ -323,7 +323,7 @@ public struct TargetSourcesBuilder {
323323
var ignoredDirectoryExtensions = ["xcodeproj", "playground", "xcworkspace"]
324324

325325
// Ignore localization directories if not supported.
326-
if toolsVersion < .vNext {
326+
if toolsVersion < .v5_3 {
327327
ignoredDirectoryExtensions.append(Resource.localizationDirectoryExtension)
328328
}
329329

@@ -366,7 +366,7 @@ public struct TargetSourcesBuilder {
366366
// sources that have an extension but are not explicitly
367367
// declared as sources in the manifest.
368368
if
369-
toolsVersion >= .vNext &&
369+
toolsVersion >= .v5_3 &&
370370
path.extension != nil &&
371371
path.extension != Resource.localizationDirectoryExtension &&
372372
!isDeclaredSource(path)
@@ -519,7 +519,7 @@ public struct FileRuleDescription {
519519
public static let xib: FileRuleDescription = {
520520
.init(
521521
rule: .processResource,
522-
toolsVersion: .vNext,
522+
toolsVersion: .v5_3,
523523
fileTypes: ["nib", "xib", "storyboard"]
524524
)
525525
}()
@@ -528,7 +528,7 @@ public struct FileRuleDescription {
528528
public static let assetCatalog: FileRuleDescription = {
529529
.init(
530530
rule: .processResource,
531-
toolsVersion: .vNext,
531+
toolsVersion: .v5_3,
532532
fileTypes: ["xcassets"]
533533
)
534534
}()
@@ -537,7 +537,7 @@ public struct FileRuleDescription {
537537
public static let coredata: FileRuleDescription = {
538538
.init(
539539
rule: .processResource,
540-
toolsVersion: .vNext,
540+
toolsVersion: .v5_3,
541541
fileTypes: ["xcdatamodeld", "xcdatamodel", "xcmappingmodel"]
542542
)
543543
}()
@@ -546,7 +546,7 @@ public struct FileRuleDescription {
546546
public static let metal: FileRuleDescription = {
547547
.init(
548548
rule: .processResource,
549-
toolsVersion: .vNext,
549+
toolsVersion: .v5_3,
550550
fileTypes: ["metal"]
551551
)
552552
}()

Sources/PackageModel/ToolsVersion.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public struct ToolsVersion: CustomStringConvertible, Comparable, Hashable, Codab
2121
public static let v4_2 = ToolsVersion(version: "4.2.0")
2222
public static let v5 = ToolsVersion(version: "5.0.0")
2323
public static let v5_2 = ToolsVersion(version: "5.2.0")
24+
public static let v5_3 = ToolsVersion(version: "5.3.0")
2425
public static let vNext = ToolsVersion(version: "999.0.0")
2526

2627
/// The current tools version in use.

Tests/PackageLoadingTests/PD5_2LoadingTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class PackageDescription5_2LoadingTests: PackageDescriptionLoadingTests {
231231
}
232232

233233
XCTAssertMatch(message, .contains("is unavailable"))
234-
XCTAssertMatch(message, .contains("was introduced in PackageDescription 999"))
234+
XCTAssertMatch(message, .contains("was introduced in PackageDescription 5.3"))
235235
}
236236
}
237237

@@ -257,7 +257,7 @@ class PackageDescription5_2LoadingTests: PackageDescriptionLoadingTests {
257257
}
258258

259259
XCTAssertMatch(message, .contains("is unavailable"))
260-
XCTAssertMatch(message, .contains("was introduced in PackageDescription 999"))
260+
XCTAssertMatch(message, .contains("was introduced in PackageDescription 5.3"))
261261
}
262262
}
263263

@@ -283,7 +283,7 @@ class PackageDescription5_2LoadingTests: PackageDescriptionLoadingTests {
283283
}
284284

285285
XCTAssertMatch(message, .contains("is unavailable"))
286-
XCTAssertMatch(message, .contains("was introduced in PackageDescription 999"))
286+
XCTAssertMatch(message, .contains("was introduced in PackageDescription 5.3"))
287287
}
288288
}
289289
}
@@ -313,7 +313,7 @@ class PackageDescription5_2LoadingTests: PackageDescriptionLoadingTests {
313313
}
314314

315315
XCTAssertMatch(message, .contains("is unavailable"))
316-
XCTAssertMatch(message, .contains("was introduced in PackageDescription 999"))
316+
XCTAssertMatch(message, .contains("was introduced in PackageDescription 5.3"))
317317
}
318318
}
319319

@@ -341,7 +341,7 @@ class PackageDescription5_2LoadingTests: PackageDescriptionLoadingTests {
341341
}
342342

343343
XCTAssertMatch(message, .contains("is unavailable"))
344-
XCTAssertMatch(message, .contains("was introduced in PackageDescription 999"))
344+
XCTAssertMatch(message, .contains("was introduced in PackageDescription 5.3"))
345345
}
346346
}
347347
}

Tests/PackageLoadingTests/PDNextLoadingTests.swift renamed to Tests/PackageLoadingTests/PD5_3LoadingTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import PackageLoading
1818

1919
class PackageDescriptionNextLoadingTests: PackageDescriptionLoadingTests {
2020
override var toolsVersion: ToolsVersion {
21-
.vNext
21+
.v5_3
2222
}
2323

2424
func testResources() throws {

Tests/PackageLoadingTests/PackageBuilderTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@ class PackageBuilderTests: XCTestCase {
19181918

19191919
let manifest = Manifest.createManifest(
19201920
name: "Foo",
1921-
v: .vNext,
1921+
v: .v5_3,
19221922
targets: [
19231923
TargetDescription(name: "Foo", resources: [
19241924
.init(rule: .process, path: "Resources")
@@ -1942,7 +1942,7 @@ class PackageBuilderTests: XCTestCase {
19421942

19431943
let manifest = Manifest.createManifest(
19441944
name: "Foo",
1945-
v: .vNext,
1945+
v: .v5_3,
19461946
targets: [
19471947
TargetDescription(name: "Foo"),
19481948
]

0 commit comments

Comments
 (0)