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
10 changes: 9 additions & 1 deletion Sources/ArgumentParser/Usage/DumpHelpGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@
//
//===----------------------------------------------------------------------===//

#if swift(>=5.11)
internal import ArgumentParserToolInfo
internal import class Foundation.JSONEncoder
#elseif swift(>=5.10)
import ArgumentParserToolInfo
import class Foundation.JSONEncoder
#else
@_implementationOnly import ArgumentParserToolInfo
@_implementationOnly import class Foundation.JSONEncoder
#endif

internal struct DumpHelpGenerator {
var toolInfo: ToolInfoV0
private var toolInfo: ToolInfoV0

init(_ type: ParsableArguments.Type) {
self.init(commandStack: [type.asCommand])
Expand Down
8 changes: 8 additions & 0 deletions Sources/ArgumentParser/Usage/MessageInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@
//
//===----------------------------------------------------------------------===//

#if swift(>=5.11)
internal import protocol Foundation.LocalizedError
internal import class Foundation.NSError
#elseif swift(>=5.10)
import protocol Foundation.LocalizedError
import class Foundation.NSError
#else
@_implementationOnly import protocol Foundation.LocalizedError
@_implementationOnly import class Foundation.NSError
#endif

enum MessageInfo {
case help(text: String)
Expand Down
6 changes: 6 additions & 0 deletions Sources/ArgumentParser/Usage/UsageGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
//
//===----------------------------------------------------------------------===//

#if swift(>=5.11)
internal import protocol Foundation.LocalizedError
#elseif swift(>=5.10)
import protocol Foundation.LocalizedError
#else
@_implementationOnly import protocol Foundation.LocalizedError
#endif

struct UsageGenerator {
var toolName: String
Expand Down