Skip to content

Fix testDuplicateTransitiveIdentityWithoutNames #3877

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
Nov 19, 2021

Conversation

SDGGiesbrecht
Copy link
Contributor

Spun out of #3838.

This one‐liner fixes testDuplicateTransitiveIdentityWithoutNames. The test exists to check the diagnostics of clashing package identities, however one of its paths is also misspelled.

Under legacy resolution, the resolver happens to traverse the graph in an order that first reaches the expected diagnostic before it actually queries the bad path. But under target‐based resolution the resolver is not so lucky, and traverses the graph in an order that attempts to read from the bad path before it detects the identity clash. Attempting to read from the bad path results in the InMemoryGitRepositoryProvider failing to look it up (as expected) and crashing on a force‐unwrap. (In the real world outside of the mocking infrastructure, a GitRepository in the same situation would throw a proper error describing that it cannot find any repository at that location.)

This PR simply fixes the path, so that the test components point at each other properly and the only error left in the test is the clashing identity whose diagnostic it is supposed to test.

@tomerd
Copy link
Contributor

tomerd commented Nov 19, 2021

@swift-ci please smoke test

@tomerd tomerd merged commit ba8699c into swiftlang:main Nov 19, 2021
@SDGGiesbrecht SDGGiesbrecht deleted the test branch November 19, 2021 21:27
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