Carthage: [Proposal] Add `check` command

Created on 25 Feb 2018  ·  9Comments  ·  Source: Carthage/Carthage

Ref: https://github.com/Carthage/Carthage/pull/2317

We save and restore Carthage directory on CI and run bootstrap every time. However, although in most cases it's not needed to build anything, it always checkouts every dependencies which takes relatively long in the process.

So I propose to add check command like Ruby Bundler has which checks if the dependencies are satisfied. It's also useful for putting in build phase like CocoaPods does to ensure that dependencis are up to date.

enhancement

Most helpful comment

@olejnjak I think this is a fair addition

Maybe you want to sync with @chuganzy and see how to go about development?

All 9 comments

Would seem like making carthage-verify a part of Carthage itself? :-)

I didn't know https://github.com/Carthage/workflows!
But apparently it's not smart as expected - it only compares commitishes between VersionFile and Cartfile.resolved. Beside Carthage also checks hash of files and Swift version compatibility.

Also I believe having this command in Carthage itself is not only more useful for users so they do not need to have a dependency to that on their project, but also easier to maintain since VersionFile logics are on Carthage itself.

BTW, carthage verify makes more sense then?

It depends, as long as it would do more than carthage-verify, it might be appropriate to be called differently.

But on the other hand I want to verify that the binaries I have can be used with the concrete project so sticking with the same name could be OK and makes sense.

@chuganzy can you outline the logic of check in a list of bullet points?

It's super simple - almost same logic as checking caches.

  1. parse Carthage.resolved
  2. Perform versionFileMatches for each dependencies

Anything new? I think it's a shame that it is stuck here for almost 2 months 🤷‍♂️

@olejnjak I think this is a fair addition

Maybe you want to sync with @chuganzy and see how to go about development?

I have an open PR that is still in development so I would like to wrap it up first.
Sorry that these days I could not make time to work on Carthage project..

Good news is that I got iMac Pro recently and it would speed up my development hopefully 😎

It's a shame there's been no movement on this: seems like a great missing feature, and mimics the CocoaPods The sandbox is not in sync with the Podfile.lock. feature which most people will be used to. Going to try out the workflow, though...

Was this page helpful?
0 / 5 - 0 ratings