Skip to content

Fix Identity Resolution #3871

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 3 commits into from
Nov 19, 2021
Merged

Fix Identity Resolution #3871

merged 3 commits into from
Nov 19, 2021

Conversation

SDGGiesbrecht
Copy link
Contributor

Spun out of #3838. This contains only the pieces related to identities.

The first commit adds a test against an existing bug in the logic that connects the dependency declarations of a target to their respective packages. Named packages (tools versions 5.2 to 5.5) are not looked up correctly, and the resolver ends up looking for them everywhere, as though the manifest were 5.1 or older. I do not think it can lead to anything breaking, but it does lead to excessive work in the resolver, and in rare cases, to more dependencies being fetched than necessary (If two dependencies have products with the same name, and only one of them is actually used, both will be fetched anyway). The test is only meaningful with target‐based resolution engaged, as legacy resolution overrides the logic with a request for .everything anyway.

The second commit fixes the bug by repairing the lookup.

The last commit updates several stale tests that were looking for old spellings of diagnostics which changed with the introduction of identities. Two of the four do not actually depend on target‐based resolution, and they were re‐enabled.

@tomerd
Copy link
Contributor

tomerd commented Nov 16, 2021

@swift-ci please smoke test

@tomerd
Copy link
Contributor

tomerd commented Nov 16, 2021

@swift-ci please test package compatibility

@tomerd tomerd self-assigned this Nov 16, 2021
@tomerd tomerd merged commit 098b8d4 into swiftlang:main Nov 19, 2021
@SDGGiesbrecht SDGGiesbrecht deleted the identity branch November 19, 2021 06:50
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.

3 participants