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-13913] Library product name must match target name?? #4466

Open
dabrahams opened this issue Nov 28, 2020 · 2 comments
Open

[SR-13913] Library product name must match target name?? #4466

dabrahams opened this issue Nov 28, 2020 · 2 comments
Labels

Comments

@dabrahams
Copy link
Contributor

Previous ID SR-13913
Radar rdar://problem/71912826
Original Reporter @dabrahams
Type Bug

Attachment: Download

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

md5: 6353403dfba25314c6072d2bf25e54c6

Issue Description:

swift test the attached project. I get:

'A' /private/tmp/pmbug: error: product 'B' not found. It is required by target 'E'. 

But the library product named "B" has clearly been declared at the beginning of the file and there's no complaint about that. The documentation doesn't say that the target names need to match the product names, nor does the documentation say how the module name is derived. If I keep everything lined up, things seem to work, but it's black magic. Please fix the documentation to explain how all of this is supposed to work.

@typesanitizer
Copy link

@swift-ci create

@neonichu
Copy link
Member

neonichu commented Dec 3, 2020

The issue here is that you can't depend on products from the same package, only targets. This is already documented [here](https://developer.apple.com/documentation/swift_packages/target/3583314-target): "The dependencies of the target. A dependency can be another target in the package or a product from a package dependency"

Clarifying that the target's name will be used as the module name seems like a good suggestion.

I do also agree that the error message is confusing since a product "B" does exist.

@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
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

4 participants