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
[Xcode 11] swift package generate-xcodeproj with RealmSwift dependency does not build. #6345
Comments
|
I have several projects which build and run with both in the Swift Package Manager CLI It's actually a more rigorous process to test with both because sometimes one environment identifies weaknesses which the other environment does not. I've been using this multi-environment SPM-centered approach for almost 2 years on multi-environment Linux/iOS/macOS C/Swift headless packages. The version auto-generated for the Xcode environment by SPM has certain GUI debugging conveniences. However, a Swift Package which builds and runs warning-free across all three environment ( So, at least in my experience, this SPM-centered (i.e. all environments are derived from the Swift Package) multi-enviroment approach can work; and, it can also help provide higher quality code. |
Well, if you can figure out a way to deal with the problems I'd certainly be interested in them, but I couldn't. The |
@tgoyne Thank you for the clarifying information. It's apparent that there are some upstream Package Manager issues to be addressed for a The following issues have now been reported as SwiftPM bugs: |
Hi, any update on this please. |
Closing this as we don't need to generate an |
Bug: An Xcode 11 project which is generated from an executable-type Swift Package which has RealmSwift as a dependency does not build.
Goals
The goal is to have an Xcode 11 project which is generated from an executable-type Swift Package which has RealmSwift as a dependency that can successfully build and run.
Expected Results
What Swift Package that builds from the command line is also expected to build in an Xcode 11 project generated from the same package.
Actual Results
Build fails as show below in the steps to reproduced.
Steps to Reproduce
marc-medley/RealmSPMXcode
is an example Swift Package with RealmSwift as a dependency.swift package generate-xcodeproj # generated: ./RealmSPMXcode.xcodeproj open RealmSPMXcode.xcodeproj/
UNITO-UNDERSCORE!Errors!UNITO-UNDERSCORE!01!
UNITO-UNDERSCORE!Errors!UNITO-UNDERSCORE!02!
UNITO-UNDERSCORE!Errors!UNITO-UNDERSCORE!03!
UNITO-UNDERSCORE!Errors!UNITO-UNDERSCORE!04!
Workaround: Edit RealmCore 5.23.5/realm/util/terminate.cpp to remove the
REALM_VER_CHUNK
expansion related error:After the about workaround more errors occur:
UNITO-UNDERSCORE!Errors!UNITO-UNDERSCORE!05!
Notice that .build/checkouts/realm-cocoa/Realm/ObjectStore/src/impl/results_notifier.hpp
and .build/checkouts/realm-cocoa/Realm/ObjectStore/src/impl/results_notifier.cpp are in the same directly.
Next attempted workaround ...
... leads to yet more errors:
UNITO-UNDERSCORE!Errors!UNITO-UNDERSCORE!06!
Code Sample
marc-medley/RealmSPMXcode
is an example Swift Package with RealmSwift as a dependency.Version of Realm and Tooling
Realm framework version: REALM_COCOA_VERSION 3.21.0
Realm Object Server version: REALM_VERSION 5.23.5
Xcode version: 11.2
iOS/OSX version: macOS Mojave 10.14.6 (18G1012)
Dependency manager + version: swift-tools-version 5.1
The text was updated successfully, but these errors were encountered: