Skip to content

Commit c1e090e

Browse files
committed
Address minor review comments
1 parent 1bd52e9 commit c1e090e

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

Sources/BuildServerProtocol/Messages/BuildTargetSourcesRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import LanguageServerProtocol
1717
#endif
1818

1919
/// The build target sources request is sent from the client to the server to
20-
/// query for the list of text documents and directories that are belong to a
20+
/// query for the list of text documents and directories that belong to a
2121
/// build target. The sources response must not include sources that are
2222
/// external to the workspace.
2323
public struct BuildTargetSourcesRequest: RequestType, Hashable {

Sources/BuildServerProtocol/SupportTypes/BuildTarget.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public struct BuildTarget: Codable, Hashable, Sendable {
3434
/// A human readable name for this target.
3535
/// May be presented in the user interface.
3636
/// Should be unique if possible.
37-
/// The id.uri is used if None.
37+
/// The id.uri is used if `nil`.
3838
public var displayName: String?
3939

4040
/// The directory where this target belongs to. Multiple build targets are

Sources/BuildSystemIntegration/BuildSystemManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ package actor BuildSystemManager: QueueBasedMessageHandler {
647647
let sourcesItems = try await self.sourceFiles(in: [target])
648648
let sourceFiles = sourcesItems.flatMap(\.sources)
649649
var result: Language? = nil
650-
for sourceFile in sourceFiles {
650+
for sourceFile in sourceFiles where sourceFile.uri == document {
651651
guard let language = sourceFile.sourceKitData?.language else {
652652
continue
653653
}

Sources/SourceKitLSP/SharedWorkDoneProgressManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ extension WorkDoneProgressManager {
4949
actor SharedWorkDoneProgressManager {
5050
private weak var sourceKitLSPServer: SourceKitLSPServer?
5151

52-
/// The number of in-progress operations. When greater than 0 `workDoneProgress` non-nil and a work done progress is
53-
/// displayed to the user.
52+
/// The number of in-progress operations. When greater than 0 `workDoneProgress` is non-nil and a work done progress
53+
/// is displayed to the user.
5454
private var inProgressOperations = 0
5555
private var workDoneProgress: WorkDoneProgressManager?
5656

Sources/SwiftExtensions/Sequence+AsyncMap.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ extension Sequence {
7171

7272
/// Just like `Sequence.first` but allows an `async` predicate function.
7373
package func asyncFirst(
74-
@_inheritActorContext _ predicate: @Sendable (Element) async throws -> Bool
74+
@_inheritActorContext where predicate: @Sendable (Element) async throws -> Bool
7575
) async rethrows -> Element? {
7676
for element in self {
7777
if try await predicate(element) {
@@ -86,6 +86,6 @@ extension Sequence {
8686
package func asyncContains(
8787
@_inheritActorContext where predicate: @Sendable (Element) async throws -> Bool
8888
) async rethrows -> Bool {
89-
return try await asyncFirst(predicate) != nil
89+
return try await asyncFirst(where: predicate) != nil
9090
}
9191
}

0 commit comments

Comments
 (0)