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
6 changes: 3 additions & 3 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
.package(url: "https://github.com/apple/swift-nio-ssl.git", .upToNextMinor(from: "2.15.0")),
.package(name: "swift-markdown", url: "https://github.com/apple/swift-markdown.git", .branch("main")),
.package(name: "CLMDB", url: "https://github.com/apple/swift-lmdb.git", .branch("main")),
.package(url: "https://github.com/apple/swift-argument-parser", .upToNextMinor(from: "0.4.4")),
.package(url: "https://github.com/apple/swift-argument-parser", .upToNextMinor(from: "1.0.1")),
.package(name: "SymbolKit", url: "https://github.com/apple/swift-docc-symbolkit", .branch("main")),
.package(url: "https://github.com/apple/swift-crypto.git", .upToNextMinor(from: "1.1.2")),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,6 @@ extension Docc {
"""))
public var diagnosticLevel: String?

// Parse and ignore any unrecognized flags, options, and input.
//
// When we're adding new flags or options to the `convert` command. This behavior allows us to also land
// changes in other tools that pass these values to `docc convert` without coordinating the two releases.

@Argument(parsing: .unconditionalRemaining, help: .hidden)
var unrecognizedArgumentsAndOptions: [String] = []

// MARK: - Computed Properties

/// The path to the directory that all build output should be placed in.
Expand Down Expand Up @@ -222,10 +214,6 @@ extension Docc {
""")
}

if !unrecognizedArgumentsAndOptions.isEmpty {
print("note: The following arguments, options, and flags were not recognized and will be ignored: \(unrecognizedArgumentsAndOptions)")
}

if let outputParent = providedOutputURL?.deletingLastPathComponent() {
var isDirectory: ObjCBool = false
guard FileManager.default.fileExists(atPath: outputParent.path, isDirectory: &isDirectory), isDirectory.boolValue else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,21 +289,6 @@ class ConvertSubcommandTests: XCTestCase {
}
}

func testExtraArgumentsAreIgnored() throws {
setenv(TemplateOption.environmentVariableKey, testTemplateURL.path, 1)

let convertOptions = try Docc.Convert.parse([
testBundleURL.path,
// These are unrecognized
"--extra-option", "\"extra value\"",
"--extra-flag",
// This flag is recognized
"--analyze"
])

XCTAssertEqual(convertOptions.unrecognizedArgumentsAndOptions, ["--extra-option", "\"extra value\"", "--extra-flag"])
}

func testIndex() throws {
setenv(TemplateOption.environmentVariableKey, testTemplateURL.path, 1)

Expand Down