You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! So I ran into a bit of a bizarre bug with Swift Package Manager yesterday when adding a dependency to my project. I've reproduced it in a fresh project and attached it to this project.
MyCodebase pulls in a remote (can be a local dependency, doesn't matter) dependency (DependencyOne) which itself has a dependency on another (DependenceTwo).
This works. No problems at this point.
Now if MyCodebase adds a new dependency onto DependencyTwo using the same URL. This works, still no problem.
However... if, when I add DependencyTwo to MyCodebase, I use a different URL for same package (for example without the .git extension) then the dependency is removed from the side panel (in Xcode) and the package will no longer be detected.
The only error you get is when you try to include DependencyTwo into a target (via the dependencies array). At that point it will simply say that DependencyTwo doesn't exist, which is of course very confusing when you've specified it above (and that's not raising any problems).
Hope that all makes sense... bit of a weird one! This was all made worse by the fact I didn't realise the dependency I was trying to add was already a dependency of the project since it was a couple packages down a chain.
The text was updated successfully, but these errors were encountered:
Attachment: Download
Environment
Xcode 12.2 (12B45b)
Additional Detail from JIRA
md5: 3915714990d4a95bffaefae0d2705e12
Issue Description:
Hey! So I ran into a bit of a bizarre bug with Swift Package Manager yesterday when adding a dependency to my project. I've reproduced it in a fresh project and attached it to this project.
Take a project with this structure:
MyCodebase:
Depends On
DependencyOne [Remote]
Depends On
MyCodebase pulls in a remote (can be a local dependency, doesn't matter) dependency (DependencyOne) which itself has a dependency on another (DependenceTwo).
This works. No problems at this point.
Now if MyCodebase adds a new dependency onto DependencyTwo using the same URL. This works, still no problem.
However... if, when I add DependencyTwo to MyCodebase, I use a different URL for same package (for example without the .git extension) then the dependency is removed from the side panel (in Xcode) and the package will no longer be detected.
The only error you get is when you try to include DependencyTwo into a target (via the dependencies array). At that point it will simply say that DependencyTwo doesn't exist, which is of course very confusing when you've specified it above (and that's not raising any problems).
Hope that all makes sense... bit of a weird one! This was all made worse by the fact I didn't realise the dependency I was trying to add was already a dependency of the project since it was a couple packages down a chain.
The text was updated successfully, but these errors were encountered: