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-15195] SwiftPM: "Resources" directory next to "Sources" is ignored even though listed in manifest #4389

Open
abertelrud opened this issue Sep 14, 2021 · 1 comment
Assignees
Labels

Comments

@abertelrud
Copy link
Contributor

Previous ID SR-15195
Radar rdar://problem/83079655
Original Reporter @abertelrud
Type Bug

Attachment: Download

Environment

SwiftPM 5.5 and also mainline SwiftPM.

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

md5: 9d28afc66aaf701c9c7d33a85b3de538

Issue Description:

In the attached package, the resources inside the "Resources" directory is silently ignored even though it's specified in the manifest. The desired layout it this:

{{ MyLibrary}}
{{ +– Package.swift}}
{{ +– Resources}}
{{ | +– CGAPalette.png}}
{{ +– Sources}}
{{ +– MyLibrary.swift}}

and the manifest has:

{{ .target(}}
{{ name: "MyLibrary",}}
{{ path: "Sources",}}
{{ resources: [ .process("../Resources") ]}})

But it seems that SwiftPM ignores this (silently) because the specified Resources directory isn't inside the target directory.

A workaround is to make the target directory ".", meaning the package directory, but then everything that's not the target (including a README.md at the top level and a Tests directory, etc) would have to be manually excluded.

What's the best way to achieve such a single-target layout?

@abertelrud
Copy link
Contributor Author

@swift-ci create

@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

2 participants