Skip to content

Adopt the ArgumentParser library for the command-line tools #2653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 39 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
d2990e9
Begin conversion to ArgumentParser for Commands
natecook1000 Mar 10, 2020
5b6ec8a
Converted SwiftBuildTool and SwiftTestTool
natecook1000 Mar 10, 2020
5194b7e
Update executable targets
natecook1000 Mar 10, 2020
53d7c7a
Converted SwiftPackageTool (the big one)
natecook1000 Mar 10, 2020
4d45bb3
Resolve remaining compilation issues
natecook1000 Mar 11, 2020
3c87d43
Make the Commands test suite pass
natecook1000 Mar 27, 2020
78436f2
Build options need to allow dash-prefixed values
natecook1000 Mar 28, 2020
dbacb35
Fix some Linux compile issues
natecook1000 Mar 28, 2020
eb19d3a
Move SwiftTool creation out of individual commands
natecook1000 Mar 30, 2020
45f5777
Switch back to master branch of argument parser
natecook1000 Mar 30, 2020
d6ca1e1
Merge branch 'master' into argumentparser
natecook1000 May 5, 2020
114d0c8
Merge branch 'master' into argumentparser
natecook1000 May 17, 2020
b172224
Merge branch 'master' into argumentparser
natecook1000 Jun 1, 2020
6f4d587
Fix default value on integrated driver flag
natecook1000 Jun 3, 2020
c398bd6
Merge branch 'master' into argumentparser
natecook1000 Jun 9, 2020
2ca9f83
Add completion tool subcommand
natecook1000 Jun 20, 2020
73d6c2a
Add default values to all command-line properties
natecook1000 Jul 10, 2020
16e97d9
Mark 'swift' as the psuedo-parent of all commands
natecook1000 Jul 10, 2020
acdd49b
Make AbsolutePath conform to ExpressibleByArgument
natecook1000 Jul 10, 2020
7e70b10
Merge branch 'master' into argumentparser
natecook1000 Jul 10, 2020
be39fa3
Simplify command configurations
natecook1000 Jul 20, 2020
4476667
Merge branch 'master' into argumentparser
natecook1000 Jul 20, 2020
1e9400c
Use expressible conformance for AbsolutePath options
natecook1000 Jul 24, 2020
6e920e7
Merge branch 'master' into argumentparser
natecook1000 Jul 24, 2020
1a29f11
Fix syntax error
natecook1000 Jul 24, 2020
c8bef10
Remove old completion script code
natecook1000 Jul 24, 2020
8a9960a
Actually generate completions for Zsh, too
natecook1000 Jul 26, 2020
904f628
Update to the ArgumentParser version 0.2.1
natecook1000 Jul 30, 2020
29b9fd4
Remove some old commented out code
natecook1000 Jul 30, 2020
2c222e3
Use compiler-style error messages
natecook1000 Aug 5, 2020
3bd1383
Update to ArgumentParser version 0.3.0
natecook1000 Aug 15, 2020
bcc8ef9
Use directory completions for AbsolutePath by default
natecook1000 Aug 15, 2020
e672475
Merge branch 'master' into argumentparser
natecook1000 Aug 15, 2020
1c8cb43
Merge branch 'master' into argumentparser
natecook1000 Aug 20, 2020
4b88111
Merge branch 'master' into argumentparser
natecook1000 Aug 21, 2020
a4fb84a
Build ArgumentParser as part of bootstrap script
natecook1000 Aug 21, 2020
1235f85
Link ArgumentParser library for building Commands w/ CMake
natecook1000 Aug 21, 2020
e510b81
Align bootstrap script with #2739
natecook1000 Aug 22, 2020
cddba18
Fix option name for C++ compiler flags
natecook1000 Aug 26, 2020
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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ find_package(dispatch QUIET)
find_package(Foundation QUIET)

find_package(Yams CONFIG REQUIRED)
find_package(ArgumentParser CONFIG REQUIRED)
find_package(SwiftDriver CONFIG REQUIRED)

add_subdirectory(Sources)
4 changes: 3 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ let package = Package(
.target(
/** High-level commands */
name: "Commands",
dependencies: ["SwiftToolsSupport-auto", "Build", "PackageGraph", "SourceControl", "Xcodeproj", "Workspace", "XCBuildSupport"]),
dependencies: ["SwiftToolsSupport-auto", "Build", "PackageGraph", "SourceControl", "Xcodeproj", "Workspace", "XCBuildSupport", "ArgumentParser"]),
.target(
/** The main executable provided by SwiftPM */
name: "swift-package",
Expand Down Expand Up @@ -263,11 +263,13 @@ if ProcessInfo.processInfo.environment["SWIFTPM_LLBUILD_FWK"] == nil {
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
package.dependencies += [
.package(url: "https://github.com/apple/swift-tools-support-core.git", .branch("master")),
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "0.3.0")),
.package(url: "https://github.com/apple/swift-driver.git", .branch("master")),
]
} else {
package.dependencies += [
.package(path: "./swift-tools-support-core"),
.package(path: "../swift-argument-parser"),
.package(path: "../swift-driver"),
]
}
3 changes: 1 addition & 2 deletions Sources/Commands/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

add_library(Commands
APIDigester.swift
Completions+bash.swift
Completions+zsh.swift
Describe.swift
Error.swift
GenerateLinuxMain.swift
Expand All @@ -24,6 +22,7 @@ add_library(Commands
SymbolGraphExtract.swift
WatchmanHelper.swift)
target_link_libraries(Commands PUBLIC
ArgumentParser
Build
PackageGraph
SourceControl
Expand Down
114 changes: 0 additions & 114 deletions Sources/Commands/Completions+bash.swift

This file was deleted.

98 changes: 0 additions & 98 deletions Sources/Commands/Completions+zsh.swift

This file was deleted.

Loading