仓库指标
- 星标
- (15,179 个星标)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
I run a Jenkins server that executes its work on a slave machine that is set to build 4 concurrent jobs at once. At times, I get irritating race conditions that cause build failures and block PRs unnecessarily. Carthage stops with messages like the following:
fatal: Unable to create '/Users/chris/Library/Caches/org.carthage.CarthageKit/dependencies/Argo/index.lock': File exists.
Generally I invoke Carthage using carthage bootstrap --no-use-binaries --platform ios,mac for my cross-platform products, because using binaries simply doesn't work with Swift code and fast-moving Xcode releases. I generally don't use submodules in my projects, either, which likely exacerbates this issue.
I think it would be beneficial to supply either a command-line switch, or something in the Cartfile that would specify a local folder to use for Carthage's cache. For instance, you could default to a non-shared cache location of Carthage/Cache (alongside Carthage/Checkouts and Carthage/Build), or the user could choose to specify their own folder.
That way I could keep on doing what I'm doing without worrying about automated build checks failing randomly, etc.
To some extent this is related to #458, #459 (in that we can maintain per-project "carthage droppings"), and surely a few others.
Alternatively, Carthage could maintain a more sensible locking mechanism to avoid running concurrent git processes that target the same folder, however that seems quite delicate.