Continue to fix cache failing to resolve dependencies with name collision #2644
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.
This continues #2286. In this pull request, any repository "owner/project" is cloned in the directory "project/owner/". So if two repositories have the same name but different owners, they will be cloned in different directories without conflicting.
But I don't think it actually fixes #2150. I'm not sure if that can even be fixed. In #2150 they want different libraries with the same name to exist simultaneously. But when you write "import library" in Xcode, how can Xcode know which library you want?
Another maybe relevant issue is #2616. This pull request doesn't fix it either. As I mentioned in that issue, the root cause is the resolver. Although when this pull request is applied, the fatal error in that issue will disappear, carthage will actually check out the two different repositories into the same working directory (Carthage/Checkouts/Result) leaving mixed contents of the two repositories in the working directory, which may not be what we want.
So what does this pull request solve or improve anyway? It can improve fetching time a little. When people switch forks and then switch back, they don't have to redownload all the branches in the old fork again.