-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Error when using package manager in Xcode 11.4 beta #2127
Comments
I post full logs : |
Hey there :) We only have so much capacity so we can't spend the time fixing specific package manager bugs, at least not until 11.4 goes out of beta. If you have a PR that might fix this issue, I'm happy to review and merge it. Thanks ! |
@nhatlee Do you have additional feedback on this issue? |
I don't have time to investigating this issue since I posted it. I will try to find out when have time. |
After some trying. It seem the issue related to problem with linking |
It shouldn't be a testTarget, the reason it's working for you is that you removed all of its dependencies There's an entire discussion around this here: https://twitter.com/freak4pc/status/1233560587176681472 |
From discussions in the SPM slack this seems like a bug. |
I have the same issue after updating to Xcode 11.4 (stable version, not beta). Any way to solve/workaround this? |
The workaround is to wrap all of your Rx dependencies in one product inside your own app, which would remove the duplications. I'm not sure this would work for RxTest and RxBloccking, though: let package = Package(
name: "Rx Wrapper",
products: [
.library(name: "Rx", targets: ["Rx"]),
.library(name: "RxTesting", targets: ["RxTesting"])
],
dependencies: [
.package(
url: "https://github.com/ReactiveX/RxSwift.git",
.upToNextMajor(from: "5.0.0")
)
],
targets: [
.target(
name: "Rx",
dependencies: ["RxSwift" , "RxCocoa", "RxRelay"]
),
.target(
name: "RxTesting",
dependencies: ["RxTest", "RxBlocking"]
)
] I'm not sure this will work for the test target, as mentioned above. |
I have a similar problem now with Xcode 11.4.1 I can see now, if I integrate RxSwift using SPM, SPM will built RxSwift as a static library: I could workaround the issue by forcing SPM to build RxSwift as a dynamic framework in my fork: antranapp@722615a Is there any reason that we are not building RxSwift as a dynamic library by default? |
@antranapp From the tests I've ran it only solves half of the issues. Tests still don't run. There's a long discussion in the SPM slack around this, and generally, it's an "open bug" . What we might have to do is basically not allow installing RxTest and RxBlocking via SPM until Apple solves this, and that should mostly solve it, I believe. |
In addition it could be useful to assign both RxBlocking and RxTest only to test targets (not your app target). For example, in the previous image, it could be useful to assign RxBlocking and RxTest not to the target XCoordinator but to a "XCoordinatorTests". |
This is still an issue in Xcode 11.5. I'm not sure if there is much to be done here or if there is reason to leave this open. Apple provides us no way to make this work well. The only workable option would be to break RxSwift into a bunch of smaller repos (5-6-7 repos) which isn't something I'm interested in doing. I hope they'll find a fix for this soon. If anyone has any additional questions / feedback, feel free to comment and I can always reopen. Thanks! |
@nhatlee @freak4pc Hello! I have completely translated my project to SPM and have this issue. In this attachment test project with RxSwift Libraries and working tests with static linking RxTest. |
I'm not entirely sure what are the configuration changes you made. Does it work for your own project? |
@freak4pc Yes, for my project it work great. In build settings for main app in chapter |
So, did you make a fork of this repo changing the product type to static for everything? |
Yes, all library static. When archive or build this app, we dont see folder frameworks in .app. Also export app work good. |
Do you have other dependencies that depend upon RxSwift? For example RxDataSources, RxSwiftExt, or others? |
In my project yes. RxDataSource, RxSwiftExt and RxGesture. |
That helps. Thank you! I'll take a look. |
@phoe3nix 's suggestion worked great for me!
|
In my project, Excluding the RxTest and RxBlocking parts of RxSwift solved the error. |
Best answer if you wouldn't use RxTest and RxBlocking in unit tests. It works perfectly for me. |
Tests build thanks to ReactiveX/RxSwift#2127 (comment)
Works for me |
If someone gets error "Missing libXCTestSwiftSupport.dylib" after set |
Short description of the issue:
I create new project for test using RxSwift via
Swift package manager
. In Xcode project I choseFile -> Swift Packages -> Add Package Dependency...
to add RxSwift repo. But after Xcode fetch the RxSwift lib successful. I press build and get the error:Expected outcome:
Expected run success.
What actually happens:
Got the error with above log
RxSwift/RxCocoa/RxBlocking/RxTest version/commit
5.0.1
Platform/Environment
How easy is to reproduce? (chances of successful reproduce after running the self contained code)
Xcode version:
Installation method:
I have multiple versions of Xcode installed:
(so we can know if this is a potential cause of your issue)
Level of RxSwift knowledge:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)
The text was updated successfully, but these errors were encountered: