Skip to content
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
14 changes: 0 additions & 14 deletions Sources/SourceKitLSP/Swift/SwiftLanguageService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -430,20 +430,6 @@ extension SwiftLanguageService {
}

let buildSettings = await self.buildSettings(for: snapshot.uri)
if buildSettings == nil || buildSettings!.isFallback, let fileUrl = notification.textDocument.uri.fileURL {
// Do not show this notification for non-file URIs to make sure we don't see this notificaiton for newly created
// files (which get opened as with a `untitled:Unitled-1` URI by VS Code.
sourceKitLSPServer?.sendNotificationToClient(
ShowMessageNotification(
type: .warning,
message: """
Failed to get compiler arguments for \(fileUrl.lastPathComponent).
Ensure the source file is part of a Swift package or has compiler arguments in compile_commands.json.
Functionality will be limited.
"""
)
)
}

let req = openDocumentSourcekitdRequest(snapshot: snapshot, compileCommand: buildSettings)
_ = try? await self.sourcekitd.send(req, fileContents: snapshot.text)
Expand Down
1 change: 0 additions & 1 deletion Tests/SourceKitLSPTests/BuildSystemTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ final class BuildSystemTests: XCTestCase {
let documentManager = await self.testClient.server.documentManager

testClient.openDocument(text, uri: doc)
_ = try await testClient.nextNotification(ofType: ShowMessageNotification.self)
let openDiags = try await testClient.nextDiagnosticsNotification()
XCTAssertEqual(openDiags.diagnostics.count, 1)
XCTAssertEqual(text, try documentManager.latestSnapshot(doc).text)
Expand Down