-
Notifications
You must be signed in to change notification settings - Fork 50
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
Will not build in generated Xcode projects #8
Comments
Nowadays I don't think you should / need to rely on generating an Xcode project since Xcode is capable of just opening the SPM project directly: I can confirm that works just fine :) |
The workaround for now is to manually add The root cause is that the module relies on a couple of symbols exported by the Swift Runtime that aren't part of its public interface. |
A little bit more detail as to why this is important to me, on the off-chance that someone from the Xcode team is reading this :) Xcode does not, AFAIK, allow package dependencies to be editable. e.g. https://developer.apple.com/forums/thread/117570 I am working on a project with multiple layers of packages (for good reasons I won't go into here) I use a scripted workflow that puts the dependencies into edit mode with these commands:
I can edit all of these packages in one Xcode project (in addition to the main multi-platform package), because it is generated after these commands are run. Although there are 7 git repos to deal with, there is only one Xcode project and edits do not have to be committed/pushed/pulled between repos before running. This is why this support is important to me. Hopefully the need for the workaround is temporary. Ideally Xcode will support editable dependencies someday. |
Resolves issue apple#8.
@ckornher Thanks for reporting this issue! I believe it is now fixed on main. Please reopen if you can still reproduce it with the current head revision. |
Unfortunately the fix triggered a compiler issue (https://bugs.swift.org/browse/SR-13708), so I'll need to revert it. |
@ckornher One solution for this is to use a single Xcode workspace and drag all of the packages into that workspace. Xcode should then use the local copies to satisfy any dependencies rather than fetching them from the remotes. |
In case Xcode project generation is still a thing these days, getting rid of the C module with something along the lines of #74 will likely eliminate these issues. However, this will require some Swift compiler & stdlib work, so it will take additional time. |
I believe #97 also resolves this (on the off chance the package works with a toolchain version that still supports |
This may not be a bug in this package, but the following sequence of commands:
generates an Xcode project that fails to build with this error:
This is using the code 12 beta 2 toolchain.
A project in Xcode 12 beta2 builds correctly when this package is added via the Swift Package tab.
Package.swift:
The text was updated successfully, but these errors were encountered: