【发布时间】:2020-09-16 03:49:15
【问题描述】:
我查看了相关的 Stack Overflow 问题并尝试了那里的建议,但无济于事以及 cocoapods 的 github 问题。
我管理 TensorIOTensorFlow pod,最近发布了该 pod 的两个更新,1.15 和 1.15.1。两个版本都标记在 GitHub 上,并在使用项目根目录中的 pod trunk push TensorIOTensorFlow.podspec 进行 linting 后推送到主干。
见https://github.com/doc-ai/tensorio-tensorflow-ios
距离我发布 1.15.1 更新已经十二个多小时了,无论我做什么我都无法获得 pod update 将本地项目从 1.15 版本更新到 1.15.1 版本或 pod install安装 1.15 版本以外的任何东西。
我已尝试清除 cocoapods 缓存:
$ rm -rf "${HOME}/Library/Caches/CocoaPods"
$ rm -rf ~/.cocoapods/repos
$ pod cache clean --all
我已尝试更新我的本地规范存储库:
$ pod install --repo-update
$ pod update --repo-update
$ pod repo update
在删除项目的 Pods 目录和 Podfile.lock 后,我尝试了 pod update 和 pod install。我已经在现有项目和新项目中以及在首次安装 cocoapods 的单独机器上尝试了这两种方法。
我已经尝试在 pod 文件中专门针对版本:
pod 'TensorIOTensorFlow', '1.15.1'
只得到以下错误:
[!] CocoaPods could not find compatible versions for pod "TensorIOTensorFlow":
In Podfile:
TensorIOTensorFlow (= 1.15.1)
None of your spec sources contain a spec satisfying the dependency: `TensorIOTensorFlow (= 1.15.1)`.
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
尽管有这个错误,而且特别令人沮丧,trunk 似乎知道 1.15.1 版本:
$ pod trunk info TensorIOTensorFlow
TensorIOTensorFlow
- Versions:
- 0.1.0 (2019-04-09 19:29:30 UTC)
- 0.1.1 (2019-05-09 17:43:06 UTC)
- 0.3.0 (2019-12-18 18:44:18 UTC)
- 0.3.1 (2020-01-23 23:36:35 UTC)
- 1.13.4 (2020-05-01 21:16:32 UTC)
- 1.13.5 (2020-05-08 21:13:09 UTC)
- 1.13.6 (2020-05-26 20:05:09 UTC)
- 1.15 (2020-05-27 17:06:58 UTC)
- 1.15.1 (2020-05-27 23:44:11 UTC)
但是 pod search 没有看到它:
$ pod search TensorIOTensorFlow
-> TensorIOTensorFlow (1.15)
The TensorFlow (unofficial) build used by TensorIO for iOS.
pod 'TensorIOTensorFlow', '~> 1.15'
- Homepage: https://github.com/doc-ai/tensorio-tensorflow-ios
- Source: https://storage.googleapis.com/tensorio-build/r1.15/TensorIO-TensorFlow-1.15_0.tar.gz
- Versions: 1.15, 1.13.6, 1.13.5, 1.13.4, 0.3.1, 0.3.0, 0.1.1, 0.1.0 [trunk repo]
可以肯定的是,这是在我用pod delete 删除了1.15 和1.15.1 版本并尝试再次将它们推送到主干之后。在此之前,pod search确实显示了 1.15.1 版本,但我仍然无法获得升级到它的项目。
最后,我尝试卸载并重新安装 cocoapods,正如我所提到的,我也在新机器上尝试了所有这些,第一次安装了最新版本的 cocoapods,但我仍然无法获得 1.15 .1 版本的 pod。
【问题讨论】:
-
您可以尝试暂时固定到提交
pod 'TensorIOTensorFlow', :git => 'https://github.com/doc-ai/tensorio-tensorflow-ios.git', :commit => ' 16f906b' -
@LouFranco 谢谢,是的,这确实可以作为一种解决方法。我还可以使用 :tag => '1.15.1' 来定位该版本。