Skip to content

Commit 39b76bb

Browse files
authored
Merge pull request #2044 from ahoppen/require-swift-6
Require Swift 6 to build SourceKit-LSP
2 parents 4ae360c + 1cfa8db commit 39b76bb

File tree

150 files changed

+63
-1083
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+63
-1083
lines changed

Package.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.10
1+
// swift-tools-version: 6.0
22

33
import Foundation
44
import PackageDescription
@@ -699,9 +699,10 @@ let package = Package(
699699
products: products,
700700
dependencies: dependencies,
701701
targets: targets,
702-
swiftLanguageVersions: [.v5, .version("6")]
702+
swiftLanguageModes: [.v6]
703703
)
704704

705+
@MainActor
705706
func swiftSyntaxDependencies(_ names: [String]) -> [Target.Dependency] {
706707
if buildDynamicSwiftSyntaxLibrary {
707708
return [.product(name: "_SwiftSyntaxDynamic", package: "swift-syntax")]
@@ -710,6 +711,7 @@ func swiftSyntaxDependencies(_ names: [String]) -> [Target.Dependency] {
710711
}
711712
}
712713

714+
@MainActor
713715
func swiftPMDependency<T>(_ values: [T]) -> [T] {
714716
if noSwiftPMDependency {
715717
return []

Sources/BuildServerProtocol/Messages.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if compiler(>=6)
1413
public import LanguageServerProtocol
15-
#else
16-
import LanguageServerProtocol
17-
#endif
1814

1915
fileprivate let requestTypes: [_RequestType.Type] = [
2016
BuildShutdownRequest.self,

Sources/BuildServerProtocol/Messages/BuildShutdownRequest.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if compiler(>=6)
1413
public import LanguageServerProtocol
15-
#else
16-
import LanguageServerProtocol
17-
#endif
1814

1915
/// Like the language server protocol, the shutdown build request is
2016
/// sent from the client to the server. It asks the server to shut down,

Sources/BuildServerProtocol/Messages/BuildTargetOutputPathsRequest.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if compiler(>=6)
1413
public import LanguageServerProtocol
15-
#else
16-
import LanguageServerProtocol
17-
#endif
1814

1915
/// For all the source files in this target, the output paths that are used during indexing, ie. the
2016
/// `-index-unit-output-path` for the file, if it is specified in the compiler arguments or the file that is passed as

Sources/BuildServerProtocol/Messages/BuildTargetPrepareRequest.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if compiler(>=6)
1413
public import LanguageServerProtocol
15-
#else
16-
import LanguageServerProtocol
17-
#endif
1814

1915
public typealias OriginId = String
2016

Sources/BuildServerProtocol/Messages/BuildTargetSourcesRequest.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if compiler(>=6)
1413
public import LanguageServerProtocol
15-
#else
16-
import LanguageServerProtocol
17-
#endif
1814

1915
/// The build target sources request is sent from the client to the server to
2016
/// query for the list of text documents and directories that belong to a

Sources/BuildServerProtocol/Messages/InitializeBuildRequest.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if compiler(>=6)
1413
public import LanguageServerProtocol
15-
#else
16-
import LanguageServerProtocol
17-
#endif
1814

1915
/// Like the language server protocol, the initialize request is sent
2016
/// as the first request from the client to the server. If the server

Sources/BuildServerProtocol/Messages/OnBuildExitNotification.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if compiler(>=6)
1413
public import LanguageServerProtocol
15-
#else
16-
import LanguageServerProtocol
17-
#endif
1814

1915
/// Like the language server protocol, a notification to ask the
2016
/// server to exit its process. The server should exit with success

Sources/BuildServerProtocol/Messages/OnBuildInitializedNotification.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if compiler(>=6)
1413
public import LanguageServerProtocol
15-
#else
16-
import LanguageServerProtocol
17-
#endif
1814

1915
/// Like the language server protocol, the initialized notification is sent from the client to the server after the client received the result of the initialize request but before the client is sending any other request or notification to the server. The server can use the initialized notification for example to initialize intensive computation such as dependency resolution or compilation. The initialized notification may only be sent once.
2016
public struct OnBuildInitializedNotification: NotificationType {

Sources/BuildServerProtocol/Messages/OnBuildLogMessageNotification.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if compiler(>=6)
1413
public import LanguageServerProtocol
15-
#else
16-
import LanguageServerProtocol
17-
#endif
1814

1915
/// The log message notification is sent from a server to a client to ask the client to log a particular message in its console.
2016
///

0 commit comments

Comments
 (0)