Skip to content

Fix retroactive conformance warnings for 6.0+ compilers #7605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Commands/PackageCommands/Init.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ extension SwiftPackageCommand {
}
}

#if swift(<6.0)
#if compiler(<6.0)
extension InitPackage.PackageType: ExpressibleByArgument {}
#else
extension InitPackage.PackageType: @retroactive ExpressibleByArgument {}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Commands/Utilities/APIDigester.swift
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ extension SerializedDiagnostics.SourceLocation {
}
}

#if swift(<6.0)
#if compiler(<6.0)
extension SerializedDiagnostics.SourceLocation: DiagnosticLocation {}
#else
extension SerializedDiagnostics.SourceLocation: @retroactive DiagnosticLocation {}
Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreCommands/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ extension URL {
}
}

#if swift(<6.0)
#if compiler(<6.0)
extension BuildConfiguration: ExpressibleByArgument {}
extension AbsolutePath: ExpressibleByArgument {}
extension WorkspaceConfiguration.CheckingMode: ExpressibleByArgument {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ extension SignatureFormat {
}
}

#if swift(<6.0)
#if compiler(<6.0)
extension SignatureFormat: ExpressibleByArgument {}
#else
extension SignatureFormat: @retroactive ExpressibleByArgument {}
Expand Down
2 changes: 1 addition & 1 deletion Sources/SPMTestSupport/misc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ extension InitPackage {
}
}

#if swift(<6.0)
#if compiler(<6.0)
extension RelativePath: ExpressibleByStringLiteral {}
extension RelativePath: ExpressibleByStringInterpolation {}
extension URL: ExpressibleByStringLiteral {}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Workspace/Diagnostics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ extension FileSystemError {
}
}

#if swift(<6.0)
#if compiler(<6.0)
extension FileSystemError: CustomStringConvertible {}
#else
extension FileSystemError: @retroactive CustomStringConvertible {}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Workspace/Workspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ private func warnToStderr(_ message: String) {
}

// used for manifest validation
#if swift(<6.0)
#if compiler(<6.0)
extension RepositoryManager: ManifestSourceControlValidator {}
#else
extension RepositoryManager: @retroactive ManifestSourceControlValidator {}
Expand Down
2 changes: 1 addition & 1 deletion Sources/swift-bootstrap/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ extension BuildConfiguration {
}
}

#if swift(<6.0)
#if compiler(<6.0)
extension AbsolutePath: ExpressibleByArgument {}
extension BuildConfiguration: ExpressibleByArgument {}
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ extension ProductFilter {
}
}

#if swift(<6.0)
#if compiler(<6.0)
extension ProductFilter: JSONSerializable, JSONMappable {}
#else
extension ProductFilter: @retroactive JSONSerializable, @retroactive JSONMappable {}
Expand Down
2 changes: 1 addition & 1 deletion Tests/PackageGraphTests/PubgrubTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3802,7 +3802,7 @@ extension PackageReference {
}
}

#if swift(<6.0)
#if compiler(<6.0)
extension Term: ExpressibleByStringLiteral {}
extension PackageReference: ExpressibleByStringLiteral {}
#else
Expand Down
2 changes: 1 addition & 1 deletion Tests/PackageGraphTests/TopologicalSortTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extension Int {
public var id: Self { self }
}

#if swift(<6.0)
#if compiler(<6.0)
extension Int: Identifiable {}
#else
extension Int: @retroactive Identifiable {}
Expand Down