swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.74k stars 1.34k forks source link

[SR-12634] SwiftPM reports cyclic dependency in Error #4559

Open 0xTim opened 4 years ago

0xTim commented 4 years ago
Previous ID SR-12634
Radar rdar://problem/62202454
Original Reporter @0xTim
Type Bug
Environment `Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)``Target: x86_64-apple-darwin19.4.0`
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 1 | |Component/s | Package Manager | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 6105d7d40f7dfd9057cf10b363b45d6c

Issue Description:

When trying to build a SwiftPM package in a directory with the same name as a dependency, SwiftPM reports:

error: cyclic dependency declaration found: BugTest -> BugTest

Steps To Reproduce:

  1. git clone git@github.com:0xTim/swiftpm-cyclic-bug.git

  2. cd swiftpm-cyclic-bug/vapor

  3. swift build

Expected Result

swift builds correctly

Actual Result

swift reports error: cyclic dependency declaration found: BugTest -> BugTest

weissi commented 4 years ago

@swift-ci create

abertelrud commented 4 years ago

Looks as if it's using the last path component of the path of the package when looking for cycles, but then reporting the name of the package (as declared in the manifest) in the error message.

trenskow commented 1 year ago

Is there any way this to get around this while this is still open (beside renaming the folder)?