Carthage fails if dependency changes a tag
- Dominant language
- Swift
- Stars
- 15.2k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
* carthage install method: homebrew
* `which carthage`: /usr/local/bin/carthage
* `carthage version`: 0.33.0
* `xcodebuild -version`: Xcode 10.2.1, Build version 10E1001
* Are you using `--no-build`? no
* Are you using `--no-use-binaries`? no
* Are you using `--use-submodules`? no
* Are you using `--cache-builds`? yes
* Are you using `--new-resolver`? no
**Cartfile**
```
github "instacart/TrueTime.swift"
```
I'm running `/usr/local/bin/carthage outdated --xcode-warnings` as part of our build process. Unfortunately this command started failing, which causes our build to fail.
**Carthage Output**
```
*** Fetching TrueTime.swift
A shell task (/usr/bin/env git fetch --prune --quiet https://github.com/instacart/TrueTime.swift.git refs/tags/*:refs/tags/* +refs/heads/*:refs/heads/* (launched in /Users/manselm/Library/Caches/org.carthage.CarthageKit/dependencies/TrueTime.swift)) failed with exit code 1
```
Running the git command to see what's wrong, it looks like the TrueTime folks did something weird with a tag
```
/usr/bin/env git fetch --prune https://github.com/instacart/TrueTime.swift.git refs/tags/*:refs/tags/* +refs/heads/*:refs/heads/*
From https://github.com/instacart/TrueTime.swift
! [rejected] 5.0.1 -> 5.0.1 (would clobber existing tag)
```
**Expected output**
Carthage's cache was out of date. It should be able to detect this and refresh its own cache, not fail.
Contributor guide
Research direction
Start with the dependency-cache handling around the reported git fetch command and reproduce the failure using the TrueTime.swift Cartfile and the 5.0.1 tag conflict. Run `carthage outdated --xcode-warnings` with the listed options; done means a changed upstream tag refreshes Carthage's cache instead of failing the build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, swift
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100