You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix discrepancies with usage of package display name/package identity in swift package edit command (#7941)
Fixes#7931
`swift package edit` was reliant on the user-passed `packageName`
argument to be able to both find the dependency (which needs the
identity) as well as to match the manifest display name.
Default to treating the user-passed argument as a package identity, and
fix the comparisons made to the manifest by instead assuring that the
canonical locations for the manifest and the dependency match. The
display name was intended to be deprecated.
### Motivation:
The vscode-swift extension made use of of the package identities when
listing dependencies in its UI. When a user would execute a `Use Local
Version` on one of these dependencies, it would call `swift package edit
<package-name>` under the hood, using the identity for the package-name
argument. However, this would fail as the `edit` command would also
treat the package name argument as the package's manifest `displayName`,
which is not guaranteed to match the identity.
### Modifications:
Treat the user-passed argument as the package identity, and deprecate
the usage of `displayName` in the `edit` command. Fix any necessary test
cases to follow suite with this change.
### Result:
The`edit` command should now be using the package identity, and there
should no longer be any discrepancies.
0 commit comments