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-14555] Bundle.module searches for bundle in swift binary location instead of Bundle.main of compiled binary #4432

Closed
ffried opened this issue Apr 30, 2021 · 3 comments
Labels

Comments

@ffried
Copy link
Contributor

ffried commented Apr 30, 2021

Previous ID SR-14555
Radar None
Original Reporter @ffried
Type Bug
Status Resolved
Resolution Done
Environment

Swift 5.4 on linux

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

md5: 93bc9ff244e85867c9beadfa5de9bb20

relates to:

  • SR-14592 Create functional test for movable executable with resource bundle in SwiftPM

Issue Description:

Since Swift 5.4, the Bundle.module lookup searches for the resource bundle next to the location where swift binary was located during compilation (e.g. /usr/bin in swift:5.4 linux docker image) instead of the location where the compiled binary lies.

This is due to the following change executing Bundle.main during the build instead of at execution time.
https://github.com/apple/swift-package-manager/pull/2972/files#diff-13eb4b18e8a4f2de8467dae905be6bdc133208159aded4aa6dbb6a03be21c6bdL584

@ffried
Copy link
Contributor Author

ffried commented Apr 30, 2021

I've opened #3463 to fix this.

@typesanitizer
Copy link

Thanks!

@ffried
Copy link
Contributor Author

ffried commented May 5, 2021

The PR was merged and cherry picked to release/5.5 as well (#3467

@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