ios - 在启用库演化的情况下构建 iOS 框架时编译错误
问题描述
我使用 swift 5.3 构建了一些包,并启用了库进化。然后我尝试在 swift 5.5 中使用这些包,但出现错误:
Failed to build module 'OrderedCollections'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)', while this compiler is 'Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)'). Please select a toolchain which matches the SDK.
我验证了这个框架是在启用库进化的情况下构建的。我可以在 swift 界面中看到这一点:
// swift-module-flags: -target x86_64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name OrderedCollections
我可以用 swift 5.5 重建这些包并且错误消失了,但是由于我们的公司构建系统,这不是我们可以做的。这些包不应该被 swift 5.5 和库进化所消耗吗?
谢谢
解决方案
推荐阅读
- python - 带有流媒体和实时仪表板的建筑设计问题
- python - 查找第一次出现最大数的索引
- javascript - setInterval 不每秒更新 DOM
- java - 使用类似于 Visual Studio 的测试资源管理器在 IntelliJ 中运行单个 testNG 测试
- css - 弹出菜单对触摸太敏感
- javascript - 如何处理来自 AWS cognito 的令牌
- npm - 如何在 Lerna + Yarn Workspaces 仓库中安装 npm 包?
- java - 如何检查我是否使用子类的实例?
- python-3.x - 何时使用二进制模式 'rb' 而不是文本 'rt' 来读取文件
- javascript - 我可以选择通过设置另一个元素的内部 html 创建的 html 元素吗?