Skip to content

Commit c6874d3

Browse files
authored
Fixup several classes of warnings (#8361)
- Remove now-redundant Sendable conformances - Remove unused variables - Fix a few missed unnecessary `@retroactive` conformances - Use swiftlang/swift-llbuild.git instead of apple/swift-llbuild.git
1 parent c083c12 commit c6874d3

File tree

9 files changed

+8
-21
lines changed

9 files changed

+8
-21
lines changed

Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,8 @@ let package = Package(
479479
dependencies: [
480480
"SPMBuildCore",
481481
"PackageGraph",
482-
]
482+
],
483+
exclude: ["CMakeLists.txt", "README.md"],
483484
),
484485
.target(
485486
/** High level functionality */

Sources/Basics/Concurrency/ConcurrencyHelpers.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ extension DispatchQueue {
4747
)
4848
}
4949

50-
51-
#if !canImport(Darwin)
52-
// As of Swift 5.7 and 5.8 swift-corelibs-foundation doesn't have `Sendable` annotations yet.
53-
extension URL: @unchecked Sendable {}
54-
#endif
55-
5650
extension DispatchQueue {
5751
package func scheduleOnQueue<T>(work: @escaping @Sendable () throws -> T) async throws -> T {
5852
try await withCheckedThrowingContinuation { continuation in

Sources/Basics/SendableTimeInterval.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
import enum Dispatch.DispatchTimeInterval
1414

15-
extension DispatchTimeInterval: @unchecked Sendable {}
16-
1715
/// This typealias hides `DispatchTimeInterval` as an implementation detail until we can use `Swift.Duration`, as the
1816
/// latter requires macOS 13.
1917
public typealias SendableTimeInterval = DispatchTimeInterval

Sources/Commands/PackageCommands/AddDependency.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ extension SwiftPackageCommand {
9393
workspace: Workspace,
9494
url: String
9595
) throws {
96-
let identity = PackageIdentity(url: .init(url))
97-
9896
// Collect all of the possible version requirements.
9997
var requirements: [PackageDependency.SourceControl.Requirement] = []
10098
if let exact {
@@ -156,8 +154,6 @@ extension SwiftPackageCommand {
156154
workspace: Workspace,
157155
id: String
158156
) throws {
159-
let identity: PackageIdentity = .plain(id)
160-
161157
// Collect all of the possible version requirements.
162158
var requirements: [PackageDependency.Registry.Requirement] = []
163159
if let exact {

Sources/QueryEngine/QueryEngine.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import _AsyncFileSystem
1414
import Basics
1515
import Crypto
16-
@preconcurrency package import SystemPackage
1716

1817
package func withQueryEngine(
1918
_ fileSystem: some AsyncFileSystem,

Sources/_AsyncFileSystem/MockFileSystem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
@preconcurrency package import struct SystemPackage.FilePath
13+
package import struct SystemPackage.FilePath
1414

1515
/// In-memory implementation of `AsyncFileSystem` for mocking and testing purposes.
1616
package actor MockFileSystem: AsyncFileSystem {

Sources/_AsyncFileSystem/OpenWritableFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
internal import class Dispatch.DispatchQueue
14-
@preconcurrency internal import struct SystemPackage.FileDescriptor
14+
internal import struct SystemPackage.FileDescriptor
1515
internal import struct SystemPackage.FilePath
1616

1717
/// A write-only thread-safe handle to an open file.

Sources/_AsyncFileSystem/ReadableFileStream.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
package import _Concurrency
1413
internal import SystemPackage
1514
internal import class Dispatch.DispatchQueue
1615

Sources/_InternalTestSupport/misc.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,10 +526,10 @@ extension RelativePath: ExpressibleByStringLiteral {}
526526
extension RelativePath: ExpressibleByStringInterpolation {}
527527
extension URL: @retroactive ExpressibleByStringLiteral {}
528528
extension URL: @retroactive ExpressibleByStringInterpolation {}
529-
extension PackageIdentity: @retroactive ExpressibleByStringLiteral {}
530-
extension PackageIdentity: @retroactive ExpressibleByStringInterpolation {}
531-
extension AbsolutePath: @retroactive ExpressibleByStringLiteral {}
532-
extension AbsolutePath: @retroactive ExpressibleByStringInterpolation {}
529+
extension PackageIdentity: ExpressibleByStringLiteral {}
530+
extension PackageIdentity: ExpressibleByStringInterpolation {}
531+
extension AbsolutePath: ExpressibleByStringLiteral {}
532+
extension AbsolutePath: ExpressibleByStringInterpolation {}
533533

534534
public func getNumberOfMatches(of match: String, in value: String) -> Int {
535535
guard match.count != 0 else { return 0 }

0 commit comments

Comments
 (0)