Skip to content

[5.5][Collections] 'describe' package matching is too loose #3544

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 1 commit into from
Jun 14, 2021

Conversation

yim-lee
Copy link
Contributor

@yim-lee yim-lee commented Jun 11, 2021

#3543 for 5.5

* [Collections] 'describe' package matching is too loose

Motivation:
rdar://79069839

To distinguish between package vs. collection URL, we first search for it as if it were a package URL. The package search, however, is done using `PackageIdentity` and not the actual URL itself. The problem with identity is that it only uses the last URL path component, so `bar/foo` and `baz/foo` would end up with the same identity `foo`.

Modifications:
Update `findPackage` to allow multiple results since a package identity (the way it is) can be associated with multiple repository URLs. Caller of `findPackage` should then filter out packages by repository URL if needed.
@yim-lee
Copy link
Contributor Author

yim-lee commented Jun 11, 2021

@swift-ci please test

@yim-lee yim-lee added the 5.5 label Jun 11, 2021
@yim-lee yim-lee merged commit b1b18c1 into swiftlang:release/5.5 Jun 14, 2021
@yim-lee yim-lee deleted the fix-describe-5.5 branch June 14, 2021 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants