Renaming `swift package edit` `packageName` argument

Hey folks!

I was recently taking a look at this issue and noticed that the edit command would make use of the positional argument packageName to fetch the corresponding package from a workspace's dependencies list, but the naming of this argument could be a little ambiguous.

The edit command initially treats the packageName as the package's identity since this is how the workspace dependencies identifies packages. However, it was also using this argument to compare against the package's displayName, which is a separate identifier used mainly for UI purposes. It seems like the name of the argument could present some confusion as to what name/identity is expected of the user to provide, so I thought renaming it to packageIdentity would better convey what it is expecting.

I've got a change uploaded here if you'd like to take a look.

I would love to know your thoughts on this proposal! :smile:

3 Likes