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-7852] Multiple targets errors only on Linux #5356

Closed
swift-ci opened this issue Jun 2, 2018 · 2 comments
Closed

[SR-7852] Multiple targets errors only on Linux #5356

swift-ci opened this issue Jun 2, 2018 · 2 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Jun 2, 2018

Previous ID SR-7852
Radar rdar://problem/41168356
Original Reporter guidomb (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: 8778b924b3cf6c48a25cbbf99a5a3ff6

duplicates:

  • SR-7834 Display names of both packages when there are multiple targets with the same name

Issue Description:

When building a project that uses both:

I get the following error only on Linux.

'SwiftServerHttp' /spmbug/.build-ubuntu/checkouts/http-8243657151313132790: error: multiple targets named 'HTTPTests'
'SwiftServerHttp' /spmbug/.build-ubuntu/checkouts/http-8243657151313132790: error: multiple targets named 'HTTP'

On macOS it builds fine.

I've attached a small project that reproduces the error. Inside that project you will find a build.sh script. If you run it on macOS it builds. If you run it on ubuntu it fails. There is a docker-build.sh to easily reproduce the error in ubuntu.

@ankitspd
Copy link
Member

@swift-ci create

@ankitspd
Copy link
Member

Looks like these target are present in two of dependencies:

error: multiple targets named 'HTTP' in: Engine, SwiftServerHttp
error: multiple targets named 'HTTPTests' in: Engine, SwiftServerHttp

--
SwiftServerHttp: https://github.com/swift-server/http/blob/develop/Package.swift#L29
Engine: https://github.com/vapor/http/blob/master/Package.swift#L20

I suspect one of the dependencies is included during the Linux build so you only see this on Linux. I will dupe this to the recently fixed https://bugs.swift.org/browse/SR-7834.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 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

2 participants