[英]pod lib lint fails with circular dependency even with newer fixed podspec available
我有两个私人吊舱: Services
和AppUI
。 在新版Cocoapods 0.35中,由于我使用的是循环依赖关系,因此Service
pod中断了,因为要对其进行修复,我进行了一些重大更改并将其发布为v2.0-alpha.1
。
AppUI
有一个称为Presenters
的子规范,它取决于Services/Models
:
s.subspec 'Presenters' do |presenters|
presenters.source_files = 'Classes/Presenters/**/*.{h,m}'
presenters.dependency 'AppUI/Core'
presenters.dependency 'Services/Models'
end
当我尝试在其上运行pod lib lint
时,它失败并显示以下错误:
[!]服务/导演与服务/模型之间存在循环依赖关系
这正是2.0-alpha.1
版本解决的问题。 运行pod lib lint --verbose
我发现了这一点:
Creating possibility state for Services/Models (4 remaining)
Attempting to activate Services/Models (2.0-alpha.1)
Unsatisfied by requested spec
Unwinding for conflict: Services/Models
Creating possibility state for Services/Models (3 remaining)
Attempting to activate Services/Models (1.0)
它首先尝试使用正确的版本,但由于含糊的“不符合所要求的规格”而回落到了旧的1.0
。 所请求的规范未指定版本,如何使其不满意? 我无法指定'~> 2'
因为AppUI
支持旧版本和新版本。
我怎样才能解决这个问题?
在CocoaPods 0.35中,默认情况下将排除预发行版本(即2.0-alpha.1),除非您明确要求它们。
您可以使用以下命令显式解析该版本:
pod 'Services', '2.0-alpha.1'
或者,通过以下方式获取最新版本(是否预发布):
pod 'Services', '> 0.0.0.pre'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.