Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,10 @@ struct SwiftPMBuildServerTests {
}
)
let begin = try await project.testClient.nextNotification(ofType: WorkDoneProgress.self)
#expect(begin.value == .begin(WorkDoneProgressBegin(title: "SourceKit-LSP: Reloading Package")))
#expect(
begin.value == .begin(WorkDoneProgressBegin(title: "SourceKit-LSP: Reloading Package"))
|| begin.value == .begin(WorkDoneProgressBegin(title: "SwiftPM: Reloading Package"))
)
didReceiveWorkDoneProgressNotification.signal()

let end = try await project.testClient.nextNotification(ofType: WorkDoneProgress.self)
Expand Down
2 changes: 2 additions & 0 deletions Tests/SourceKitLSPTests/DefinitionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ class DefinitionTests: SourceKitLSPTestCase {
)
"""
)
try await SwiftPMTestProject.build(at: project.scratchDirectory)
let (uri, positions) = try project.openDocument("LibB.m")
let response = try await project.testClient.send(
DefinitionRequest(textDocument: TextDocumentIdentifier(uri), position: positions["3️⃣"])
Expand Down Expand Up @@ -300,6 +301,7 @@ class DefinitionTests: SourceKitLSPTestCase {
)
"""
)
try await SwiftPMTestProject.build(at: project.scratchDirectory)
let (uri, positions) = try project.openDocument("LibB.m")
let response = try await project.testClient.send(
DefinitionRequest(textDocument: TextDocumentIdentifier(uri), position: positions["3️⃣"])
Expand Down
6 changes: 5 additions & 1 deletion Tests/SourceKitLSPTests/WorkspaceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,11 @@ final class WorkspaceTests: SourceKitLSPTestCase {
workspace: DocumentURI(project.scratchDirectory)
)
)
XCTAssertEqual(outputPaths.outputPaths.map { $0.suffix(13) }.sorted(), ["FileA.swift.o", "FileB.swift.o"])
if project.testClient.server.options.swiftPMOrDefault.buildSystem == .swiftbuild {
XCTAssertEqual(outputPaths.outputPaths.map { $0.suffix(7) }.sorted(), ["FileA.o", "FileB.o"])
} else {
XCTAssertEqual(outputPaths.outputPaths.map { $0.suffix(13) }.sorted(), ["FileA.swift.o", "FileB.swift.o"])
}
}

func testOrphanedClangLanguageServiceShutdown() async throws {
Expand Down