Fix testDuplicateTransitiveIdentityWithoutNames
#3877
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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, aGitRepository
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.