> On 10 May 2016, at 16:38, Daniel Dunbar <[email protected]> wrote: > > >> On May 10, 2016, at 12:42 AM, Rob Allen via swift-build-dev >> <[email protected]> wrote: >> >> I'm not totally sold on `swift package` as the new command though as >> "package" is an imperative verb like "build" or "test" and implies that if I >> run it, then it will generate a "package" whereas it will actually do >> nothing as an additional switch will be required. This requirement to always >> take a second sub-command makes it different from `swift build` and `swift >> test` too. Are there any commands to `swift` current that require a >> sub-command to work? > > I agree with this part about package sounding like an imperative verb. Do you > have an alternative proposal that you like better, though? In practice, this > confusion will be quickly mitigated as `swift package` simply shows the help.
While I'm thinking about this... Are there any commands to `swift` that are not package manager commands? If not, then another option is to move all the package manager operations to top level commands of `swift`. e.g. `swift init`, `swift generate-xcodeproj` etc. This solves the discoverability and tab completion between `swift` and `swiftpm` problem completely, and also makes for a sane api of: $ swift init $ swift add https://github.com/apple/example-package-playingcard.git $ swift build $ swift test As an aside, anone of the subcommands to `swift` are discoverable because `swift -h` displays "OVERVIEW: Swift compiler" and doesn't imply that it does anything different to `swiftc` which also says "OVERVIEW: Swift compiler" when you do `swift -h`, but has a different set of options :) _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
