Skip to content

Commit d7878b0

Browse files
authored
Replace 5.11 version with 6.0 in the code base (#7361)
This is a follow up to a corresponding toolchain PR swiftlang/swift#71707.
1 parent fc1b37a commit d7878b0

File tree

33 files changed

+121
-99
lines changed

33 files changed

+121
-99
lines changed

Fixtures/Miscellaneous/DoNotFilterLinkerDiagnostics/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.11
1+
// swift-tools-version: 6.0
22

33
import PackageDescription
44

Fixtures/Miscellaneous/Plugins/DependentPlugins/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.11
1+
// swift-tools-version: 6.0
22

33
import PackageDescription
44

Fixtures/Miscellaneous/Plugins/MySourceGenPluginUsingURLBasedAPI/Package.swift

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

44
let package = Package(

Sources/Basics/SwiftVersion.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public struct SwiftVersion {
5858
extension SwiftVersion {
5959
/// The current version of the package manager.
6060
public static let current = SwiftVersion(
61-
version: (5, 11, 0),
61+
version: (6, 0, 0),
6262
isDevelopment: true,
6363
buildIdentifier: getBuildIdentifier()
6464
)

Sources/Build/BuildManifest/LLBuildManifestBuilder.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,12 @@ extension LLBuildManifestBuilder {
220220
}
221221
let additionalOutputs: [Node]
222222
if command.outputFiles.isEmpty {
223-
if target.toolsVersion >= .v5_11 {
223+
if target.toolsVersion >= .v6_0 {
224224
additionalOutputs = [.virtual("\(target.target.c99name)-\(command.configuration.displayName ?? "\(pluginNumber)")")]
225225
phonyOutputs += additionalOutputs
226226
} else {
227227
additionalOutputs = []
228-
observabilityScope.emit(warning: "Build tool command '\(displayName)' (applied to target '\(target.target.name)') does not declare any output files and therefore will not run. You may want to consider updating the given package to tools-version 5.11 (or higher) which would run such a build tool command even without declared outputs.")
228+
observabilityScope.emit(warning: "Build tool command '\(displayName)' (applied to target '\(target.target.name)') does not declare any output files and therefore will not run. You may want to consider updating the given package to tools-version 6.0 (or higher) which would run such a build tool command even without declared outputs.")
229229
}
230230
pluginNumber += 1
231231
} else {

Sources/Commands/PackageTools/Init.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ extension SwiftPackageTool {
8383
}
8484
}
8585

86-
#if swift(<5.11)
86+
#if swift(<6.0)
8787
extension InitPackage.PackageType: ExpressibleByArgument {}
8888
#else
8989
extension InitPackage.PackageType: @retroactive ExpressibleByArgument {}

Sources/Commands/Utilities/APIDigester.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ extension SerializedDiagnostics.SourceLocation {
328328
}
329329
}
330330

331-
#if swift(<5.11)
331+
#if swift(<6.0)
332332
extension SerializedDiagnostics.SourceLocation: DiagnosticLocation {}
333333
#else
334334
extension SerializedDiagnostics.SourceLocation: @retroactive DiagnosticLocation {}

Sources/CoreCommands/Options.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ extension URL {
606606
}
607607
}
608608

609-
#if swift(<5.11)
609+
#if swift(<6.0)
610610
extension BuildConfiguration: ExpressibleByArgument {}
611611
extension AbsolutePath: ExpressibleByArgument {}
612612
extension WorkspaceConfiguration.CheckingMode: ExpressibleByArgument {}

Sources/PackageDescription/Context.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public struct Context {
2424
}
2525

2626
/// Information about the git status of a given package, if available.
27-
@available(_PackageDescription, introduced: 5.11)
27+
@available(_PackageDescription, introduced: 6.0)
2828
public static var gitInformation: GitInformation? {
2929
model.gitInformation.map {
3030
GitInformation(
@@ -45,7 +45,7 @@ public struct Context {
4545
}
4646

4747
/// Information about the git status of a given package, if available.
48-
@available(_PackageDescription, introduced: 5.11)
48+
@available(_PackageDescription, introduced: 6.0)
4949
public struct GitInformation {
5050
public let currentTag: String?
5151
public let currentCommit: String

Sources/PackageLoading/TargetSourcesBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public struct TargetSourcesBuilder {
185185
}
186186

187187
let additionalResources: [Resource]
188-
if toolsVersion >= .v5_11 {
188+
if toolsVersion >= .v6_0 {
189189
additionalResources = declaredResources.compactMap { resource in
190190
if handledResources.contains(resource.path) {
191191
return nil

0 commit comments

Comments
 (0)