[swift-evolution] [swift-build-dev] [Review] SE-0085: Package Manager Command Names
Rob Allen
rob at akrabat.com
Wed May 11 01:34:53 CDT 2016
> On 10 May 2016, at 16:38, Daniel Dunbar <daniel_dunbar at apple.com> wrote:
>
>
>> On May 10, 2016, at 12:42 AM, Rob Allen via swift-build-dev <swift-build-dev at swift.org> 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.
It "should" be `swift package-manager` or `swift pm` as we're operating on the package manager, not on our swift project directly. i.e. `swift package-manager init` or `swift pm generate-xcodeproj` work because the verb is the third parameter, not the second. When we have two verbs, such as `swift package generate-xcodeproj`, it doesn't read well to me at all.
The space between `swift` and `package-manager` (or `pm`) is a bit inelegant and only exists in order to shoehorn this into the `swift` metatool. To my mind, it shows that this functionality would be better off as its own top level command: `swiftpm` being the obvious one, though `spm` also works.
For what's worth, I'm not a fan of creating a solution that a sizeable proportion of people feel the need to alias. Aliases should never be used in documentation, but do end up being passed around by team members as they are pasted into tools like Slack or Wikis and then cause confusion.
Regards,
Rob...
More information about the swift-evolution
mailing list