Skip to content
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

[SR-1168] Deal with dependency name collisions #5464

Closed
swift-ci opened this issue Apr 6, 2016 · 7 comments
Closed

[SR-1168] Deal with dependency name collisions #5464

swift-ci opened this issue Apr 6, 2016 · 7 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Apr 6, 2016

Previous ID SR-1168
Radar rdar://problem/40206312
Original Reporter d3roch4 (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: b5e97af43958077ed19803a950fcccf8

relates to:

  • SR-679 swiftpm should support rewriting dependent package urls for vendoring
  • SR-1195 Dependency names that differ only in case cause conflicts
  • SR-1402 Check dependency graph for possible collisions

Issue Description:

I'm using two modules qutheory / steam and PlanTeam / MongoKitten in my Package.swift being so configured:
dependencies: [
.package (Url "https://github.com/qutheory/vapor.git," majorVersion: 0, minor: 5),
.package (Url: "https://github.com/PlanTeam/MongoKitten.git" Version (0, 5, 9))
]

The MongoKitten depends on:
.package (Url: "https://github.com/CryptoKitten/CryptoEssentials.git" majorVersion: 0, minor: 2)

And steam depends on:
.package (Url: "https://github.com/qutheory/CryptoEssentials.git" majorVersion: 0, minor: 2)

During the build happens the error:
error: Failed to clone https://github.com/CryptoKitten/CryptoEssentials.git to /home/andre/workspace/businesscard/Packages/CryptoEssentials

@ankitspd
Copy link
Member

ankitspd commented Apr 6, 2016

as of now swiftpm cannot handle such collisions, there has been some discussions about handling such cases on mailing list.

@mxcl
Copy link
Contributor

mxcl commented Apr 6, 2016

Perhaps we can get some context here so that we can be sure about our solutions.

Are these forks? Or completely different packages with the same name?

@ddunbar
Copy link
Member

ddunbar commented Apr 7, 2016

These are forks... maybe it is possible to allow automatic reconciliation of this when SwiftPM can pick an appropriate tag that exists and is equal in both versions?

@ankitspd
Copy link
Member

ankitspd commented Apr 7, 2016

^ sounds good to me

@mxcl
Copy link
Contributor

mxcl commented Apr 7, 2016

@ddunbar nice idea.

Certainly we could do that, and maybe we should.

However someone made a fork for a reason, a bug fix perhaps, or a feature addition. Really the end-user should pick one, and hopefully they will have compatible API (it's likely).

Whatever: we need a proper proposal.

@abertelrud
Copy link
Contributor

I ran into this recently as well. We need to:

  1. have better equality comparison of repository URLs (for cases in which the same repo is accessed via `https` as well as `git` etc)

  2. have some way to deal with references to two different repositories that are really forks of the same one; perhaps we can use SHA comparisons for this etc

@ankitspd
Copy link
Member

I think we shouldn't automatically merge the forks. We do plan to do a fork support feature at some point, I'll dupe this report to that bug.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants