diff --git a/Package.swift b/Package.swift index 88d45207..d806025e 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.5 import PackageDescription @@ -28,7 +28,7 @@ let package = Package( // See 'Dependencies' below. ], targets: [ - .target( + .executableTarget( name: "sourcekit-lsp", dependencies: [ "LanguageServerProtocolJSONRPC", @@ -65,7 +65,6 @@ let package = Package( "LSPTestSupport", "SourceKitLSP", .product(name: "ISDBTestSupport", package: "IndexStoreDB"), - .product(name: "tibs", package: "IndexStoreDB"), // Never imported, needed at runtime .product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"), ], resources: [ diff --git a/Sources/sourcekit-lsp/main.swift b/Sources/sourcekit-lsp/SourceKitLSP.swift similarity index 99% rename from Sources/sourcekit-lsp/main.swift rename to Sources/sourcekit-lsp/SourceKitLSP.swift index 5a073554..b8437833 100644 --- a/Sources/sourcekit-lsp/main.swift +++ b/Sources/sourcekit-lsp/SourceKitLSP.swift @@ -54,7 +54,8 @@ extension PathPrefixMapping: ExpressibleByArgument { extension LogLevel: ExpressibleByArgument {} extension BuildConfiguration: ExpressibleByArgument {} -struct Main: ParsableCommand { +@main +struct SourceKitLSP: ParsableCommand { static let configuration = CommandConfiguration( abstract: "Language Server Protocol implementation for Swift and C-based languages" ) @@ -209,5 +210,3 @@ struct Main: ParsableCommand { dispatchMain() } } - -Main.main()