gpt4 book ai didi

ios - 即使有较新的固定 podspec 可用,pod lib lint 也会因循环依赖而失败

转载 作者:行者123 更新时间:2023-11-29 12:33:07 28 4
gpt4 key购买 nike

我有两个私有(private) pod:ServicesAppUI。随着新的 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 时,它因以下错误而失败:

[!] There is a circular dependency between Services/Directors and Services/Models

这正是版本 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'

关于ios - 即使有较新的固定 podspec 可用,pod lib lint 也会因循环依赖而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27069753/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com