Carthage icon indicating copy to clipboard operation
Carthage copied to clipboard

Carthage doesn't appear to "see" latest commit of local repository specified with a relative path

Open bcattle opened this issue 10 years ago • 15 comments

This is kind of an obscure corner case. I have a Cartfile that specifies a dependency on a local repo like this:

git "../ISUtils" 

If I run carthage update I get

$ carthage update
*** Fetching ISUtils
*** Checking out ISUtils at "1.0.0"

I can change the Cartfile to specify the same repo using an absolute path

git "file:///Users/bryan/Documents/ISUtils"

Now if I run carthage update I get

$ carthage update
*** Fetching ISUtils
*** Checking out ISUtils at "1.0.1"

The second checkout is correct, the latest commit is tagged "1.0.1". The commit before that ("HEAD~1") is tagged as "1.0.0".

bcattle avatar Dec 04 '15 07:12 bcattle

I have run into this issue as well. It seems to be a caching issue. After nuking ~/Library/Caches/org.carthage.CarthageKit it saw the latest version.

brentleyjones avatar Dec 07 '15 15:12 brentleyjones

+1

Amnell avatar Dec 21 '15 12:12 Amnell

@brentleyjones - Thanks for the link to that folder. I wish that were in the documentation somewhere! I was tracking down some other problem that was clearly a result of caching and was looking for some carthage command to purge its caches. I guess we can go behind the scenes and fix it at the very least.

+1

robertmryan avatar Dec 29 '15 16:12 robertmryan

+1

jomnius avatar Jan 11 '16 09:01 jomnius

I am seeing the same problem when using a local repository as dependency. Commits are hardly ever picked up by carthage update and I have to delete the cache every time I want to update the dependency.

tkrajacic avatar Mar 16 '16 14:03 tkrajacic

+1

I don't think this is just happening with the relative paths. I see the same thing with absolute paths also. Opening general issue #1191

sstadelman avatar Mar 17 '16 18:03 sstadelman

Seeing this too. A workaround is to manually edit Cartfile.resolved with the right hash and do carthage update X.

NachoSoto avatar Apr 08 '16 00:04 NachoSoto

Just got this. None of my repos have any tags. Carthage keeps picking up a commit thats over a month old. Completely ignoring the commits made since then.

Tried deleting the carthage cache directory.

Now carthage is crashing when attempting to read the local repo.

*** Cloning crux-lib 2016-07-25 12:50:24.879 carthage[75515:1086206] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'working directory doesn't exist.' *** First throw call stack: ( 0 CoreFoundation 0x00007fff9d81e4f2 __exceptionPreprocess + 178 1 libobjc.A.dylib 0x00007fff950ea73c objc_exception_throw + 48 2 CoreFoundation 0x00007fff9d8854bd +[NSException raise:format:] + 205 3 Foundation 0x00007fff8de6f10b -[NSConcreteTask launchWithDictionary:] + 620 4 ReactiveTask 0x0000000100f6a33e TFFFF12ReactiveTask10launchTaskFTVS_4Task13standardInputGSqGV13ReactiveCocoa14SignalProducerCSo6NSDataO6Result7NoError___GS2_GOS_9TaskEventS3__OS_9TaskError_U_FTGVS1_8ObserverGS6_S3__S7__CS1_19CompositeDisposable_T_U0_FTCS_P33_8622FA0C3FE9071537A42FE3BB905E344PipeS10__GS2_GS6_S3__S7__U_FTGS8_GS6_S3__S7__S9__T + 1678 5 ReactiveTask 0x0000000100f667dc TPA__TFFFF12ReactiveTask10launchTaskFTVS_4Task13standardInputGSqGV13ReactiveCocoa14SignalProducerCSo6NSDataO6Result7NoError___GS2_GOS_9TaskEventS3__OS_9TaskError_U_FTGVS1_8ObserverGS6_S3__S7__CS1_19CompositeDisposable_T_U0_FTCS_P33_8622FA0C3FE9071537A42FE3BB905E344PipeS10__GS2_GS6_S3__S7__U_FTGS8_GS6_S3__S7__S9__T + 556 6 ReactiveCocoa 0x0000000100e4a6a7 TFV13ReactiveCocoa14SignalProducer15startWithSignalfFTGCS_6Signalxq__PS_10Disposable__T_T + 759 7 ReactiveCocoa 0x0000000100ddf9b7 TTWu0_R_s9ErrorTyperGV13ReactiveCocoa14SignalProducerxq__S0_18SignalProducerTypeS0_FS2_15startWithSignalfFTGCS0_6Signalwx5Valuewx5Error_PS0_10Disposable__T_T + 87 8 ReactiveCocoa 0x0000000100e1e331 TFFe13ReactiveCocoaRxS_10SignalTypewx5ValueS_18SignalProducerTypewx5ErrorzWxS1_5Error_rS0_P33_F9B5D3FB407CAF9A5D2D355C6E47C3CE12observeMergeFTGVS_8ObserverWxS1_5Value_wxS3__CS_19CompositeDisposable_GSqPS_10Disposable__U0_FGOS_5EventQQPS0_5ValueQS10_5Error_T + 433 9 ReactiveCocoa 0x0000000100e1b0d8 TPA__TFFe13ReactiveCocoaRxS_10SignalTypewx5ValueS_18SignalProducerTypewx5ErrorzWxS1_5Error_rS0_P33_F9B5D3FB407CAF9A5D2D355C6E47C3CE12observeMergeFTGVS_8ObserverWxS1_5Value_wxS3__CS_19CompositeDisposable_GSqPS_10Disposable__U0_FGOS_5EventQQPS0_5ValueQS10_5Error_T + 248 10 ReactiveCocoa 0x0000000100dff830 TFFC13ReactiveCocoa6SignalcFFGVS_8Observerxq__GSqPS_10Disposable__GS0_xq__U_FGOS_5EventQ_Q0__T + 2336 11 ReactiveCocoa 0x0000000100e632cd TFFV13ReactiveCocoa14SignalProducer15startWithSignalFFTGCS_6Signalxq__PS_10Disposable__T_T_U0_FGOS_5EventQ_Q0__T + 221 12 ReactiveCocoa 0x0000000100e4f78e TPA__TFFV13ReactiveCocoa14SignalProducer15startWithSignalFFTGCS_6Signalxq__PS_10Disposable__T_T_U0_FGOS_5EventQ_Q0__T + 110 13 ReactiveCocoa 0x0000000100dff830 TFFC13ReactiveCocoa6SignalcFFGVS_8Observerxq__GSqPS_10Disposable__GS0_xq__U_FGOS_5EventQ_Q0__T + 2336 14 ReactiveCocoa 0x0000000100e016ea TFFFE13ReactiveCocoaPS_10SignalType3mapurFFwx5Valueqd__GCS_6Signalqd__wx5Error_U_FGVS_8ObserverQ_QQPS0_5Error_GSqPS_10Disposable__U_FGOS_5EventQS5_5ValueS6__T + 170 15 ReactiveCocoa 0x0000000100dfcf8f TPA__TFFFE13ReactiveCocoaPS_10SignalType3mapurFFwx5Valueqd__GCS_6Signalqd__wx5Error_U_FGVS_8ObserverQ_QQPS0_5Error_GSqPS_10Disposable__U_FGOS_5EventQS5_5ValueS6__T + 175 16 ReactiveCocoa 0x0000000100dff830 TFFC13ReactiveCocoa6SignalcFFGVS_8Observerxq__GSqPS_10Disposable__GS0_xq__U_FGOS_5EventQ_Q0__T + 2336 17 ReactiveCocoa 0x0000000100e632cd TFFV13ReactiveCocoa14SignalProducer15startWithSignalFFTGCS_6Signalxq__PS_10Disposable__T_T_U0_FGOS_5EventQ_Q0__T + 221 18 ReactiveCocoa 0x0000000100e4f78e _TPA__TFFV13ReactiveCocoa14SignalProducer15startWithSignalFFTGCS_6Signalxq__PS_10Disposab ...

drekka avatar Jul 25 '16 02:07 drekka

@drekka That's a duplicate of #1324/#1355. It'd be a great first bug if you were interested in contributing to the project.

It's on my list, but I haven't gotten around to it yet.

mdiep avatar Jul 25 '16 23:07 mdiep

Finally submitted a fix https://github.com/Carthage/Carthage/pull/2125.

ikesyo avatar Aug 21 '17 15:08 ikesyo

This happened to me on carthage 0.26.0 just now, with Cartfile pointed at a github fork

  1. Did carthage update a few times
  2. Had never specified a branch or pushed a new tag in the Cartfile
  3. Realized my mistake, started trying to force a branch name, "branchname", "HEAD", etc.
  4. Carthage would never see the new commits
  5. Cleared cache and all good

lacyrhoades avatar Oct 12 '17 17:10 lacyrhoades

Just happened to me right now. Switched from my own fork to the upstream repo. Carthage kept finding some commit from 18 months ago even though I have it set to the master branch. Cleared the cache folder as mentioned above and it now sees the correct commit.

einsteinx2 avatar Oct 13 '17 21:10 einsteinx2

@lacyrhoades @einsteinx2 This issue is about local git repositories, not about repositories on GitHub. You may be hitting #2143 so please follow that issue instead.

ikesyo avatar Oct 14 '17 02:10 ikesyo

~~Haven't yet~~ tested the implications on this from #2260 (which reverts #2125 (which closed this issue)), ~~but I'm assuming~~ this is again an issue with the release of 0.27.0.

Workaround (~~as yet untested~~ — passed my testing)

When file:// URLs can't be made absolute (as often is the case to allow differently named user accounts), create a symlink to the respective repository directory within /Users/Shared or /usr/local/share.

jdhealy avatar Dec 08 '17 20:12 jdhealy

+1

gigaga avatar Dec 10 '18 13:12 gigaga