error: Couldn't IRGen expression, no additional error [duplicate]

那年仲夏 提交于 2019-12-02 20:23:02

I had same issue with Carthage. However while looking more closely at console I've spotted that Carthage instead of building RxSwift just downloaded pre-built binaries,

*** Downloading RxSwift.framework binary at "Zürich"

that in turn contribute to IRGen error. So forcing Carthage to build framework instead of downloading binary worked.

carthage update --platform iOS --no-use-binaries

The swift debugging format is a binary dump of Swift internal objects so you have to have compiled your binaries with the compiler that ships with the debugger you are using or things go badly.

I can repro the behavior you were seeing using Xcode 10.0 and the project you provided. But then I got the RxSwift sources from github and rebuilt them with the Xcode 10.0 compiler and replaced your RxSwift.framework with the one I built locally and reran the test, and the expression you had attached to the breakpoint worked correctly. Can you see if that also works for you?

The debugger should have given a better error message, if you want to file a bug with the swift bug reporter (http://bugs.swift.org) we can look at improving the error message.

I had the same issue with Carthage - RxSwift.

Deleting files from

Carthage/Build/...

Carthage/Checkouts/

And calling carthage update in terminal resolved my issue.

Update:

We noticed this issue happens only when updating RxSwift library to version 4.3 and above. Setting version to 4.2.x works normal.

Pet

Check if the frameworks are properly connected. In my case, the replacement framework on POD solved this problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!