File tree Expand file tree Collapse file tree 8 files changed +35
-12
lines changed Expand file tree Collapse file tree 8 files changed +35
-12
lines changed Original file line number Diff line number Diff line change 11add_library (Diagnose STATIC
22 CommandConfiguration+Sendable.swift
33 CommandLineArgumentsReducer.swift
4+ DebugCommand.swift
45 DiagnoseCommand.swift
56 IndexCommand.swift
67 MergeSwiftFiles.swift
Original file line number Diff line number Diff line change 1+ //===----------------------------------------------------------------------===//
2+ //
3+ // This source file is part of the Swift.org open source project
4+ //
5+ // Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors
6+ // Licensed under Apache License v2.0 with Runtime Library Exception
7+ //
8+ // See https://swift.org/LICENSE.txt for license information
9+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+ //
11+ //===----------------------------------------------------------------------===//
12+
13+ import ArgumentParser
14+
15+ public struct DebugCommand : ParsableCommand {
16+ public static let configuration = CommandConfiguration (
17+ commandName: " debug " ,
18+ abstract: " Commands to debug sourcekit-lsp. Intended for developers of sourcekit-lsp " ,
19+ subcommands: [
20+ IndexCommand . self,
21+ ReduceCommand . self,
22+ ReduceFrontendCommand . self,
23+ RunSourceKitdRequestCommand . self,
24+ ]
25+ )
26+
27+ public init ( ) { }
28+ }
Original file line number Diff line number Diff line change @@ -55,8 +55,7 @@ private actor IndexLogMessageHandler: MessageHandler {
5555public struct IndexCommand : AsyncParsableCommand {
5656 public static let configuration : CommandConfiguration = CommandConfiguration (
5757 commandName: " index " ,
58- abstract: " Index a project and print all the processes executed for it as well as their outputs " ,
59- shouldDisplay: false
58+ abstract: " Index a project and print all the processes executed for it as well as their outputs "
6059 )
6160
6261 @Option (
Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ import class TSCUtility.PercentProgressAnimation
2222public struct ReduceCommand : AsyncParsableCommand {
2323 public static let configuration : CommandConfiguration = CommandConfiguration (
2424 commandName: " reduce " ,
25- abstract: " Reduce a single sourcekitd crash " ,
26- shouldDisplay: false
25+ abstract: " Reduce a single sourcekitd crash "
2726 )
2827
2928 @Option ( name: . customLong( " request-file " ) , help: " Path to a sourcekitd request to reduce. " )
Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ import class TSCUtility.PercentProgressAnimation
2222public struct ReduceFrontendCommand : AsyncParsableCommand {
2323 public static let configuration : CommandConfiguration = CommandConfiguration (
2424 commandName: " reduce-frontend " ,
25- abstract: " Reduce a single swift-frontend crash " ,
26- shouldDisplay: false
25+ abstract: " Reduce a single swift-frontend crash "
2726 )
2827
2928 #if canImport(Darwin)
Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ import struct TSCBasic.AbsolutePath
2121public struct RunSourceKitdRequestCommand : AsyncParsableCommand {
2222 public static let configuration = CommandConfiguration (
2323 commandName: " run-sourcekitd-request " ,
24- abstract: " Run a sourcekitd request and print its result " ,
25- shouldDisplay: false
24+ abstract: " Run a sourcekitd request and print its result "
2625 )
2726
2827 @Option (
Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ public class OutOfProcessSourceKitRequestExecutor: SourceKitRequestExecutor {
161161 let process = Process (
162162 arguments: [
163163 ProcessInfo . processInfo. arguments [ 0 ] ,
164+ " debug " ,
164165 " run-sourcekitd-request " ,
165166 " --sourcekitd " ,
166167 sourcekitd. path,
Original file line number Diff line number Diff line change @@ -105,10 +105,7 @@ struct SourceKitLSP: AsyncParsableCommand {
105105 abstract: " Language Server Protocol implementation for Swift and C-based languages " ,
106106 subcommands: [
107107 DiagnoseCommand . self,
108- IndexCommand . self,
109- ReduceCommand . self,
110- ReduceFrontendCommand . self,
111- RunSourceKitdRequestCommand . self,
108+ DebugCommand . self,
112109 ]
113110 )
114111
You can’t perform that action at this time.
0 commit comments