-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speeding up carthage outdated
build phases
#2698
Comments
Thanks for opening an issue 🎉 Is there a reason why you think carthage should do this as opposed of wrapping carthage commands in a script of your making that does exactly what you propose? |
The README file recommends with a nice one-liner to add this command as a build phase, which is good because without any warning some dependencies might become really outdated without anyone noticing. Given that the subcommand has an I have a relatively fast wired connection on my desktop computer and currently use only 2 dependencies in this project, yet it takes between 1 and 3 seconds on every single build, and Xcode doesn't do anything in the meantime. I might do hundreds of debug builds every day so that's hundreds of seconds lost waiting for a redundant roundtrip to the network. On a slower connection and with 5 dependencies this can add up to thousands of seconds. Incremental (iterative) debug builds are relatively fast so I can't go fetch a coffee while waiting so it would be great if that build time were as minimal as possible without having to sacrifice a periodical updates check. Requiring users to write their own script, however, has three big drawbacks:
So basically it's a lot of work to save a lot of time for a feature I'd recommend everybody to use. It's an (performance) enhancement request so nothing critical. ;-) |
I see your points, but this in my opinion this is a workflow related choice. Therefore I am reluctant to add this directly in Carthage but, if you want to share your workflow other users could benefit from your contributions here https://github.com/Carthage/workflows Maybe @Carthage/carthage has other opinions. |
I'd love for I agree this repo is not the right place to include a shell script. |
Hello guys 👋 I like this idea a lot and would like to help working on it 🙌To move the discussion a bit forward I created a draft pull request where I started the implementation and asked a few follow-up questions. Hopefully you don't mind and I would like to kindly ask you to have a look at the draft 👀 😊🙇🏻♂️ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
👋 stale, I just changed PR from draft to ready for review 🎉 |
Just to add to the options for solving this issue, I ended up moving |
This comment has been minimized.
This comment has been minimized.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Can we please re-open the issue? 🙏 The PR is waiting for review. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@Stale still in progress 👍 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi everybody,
This is my first issue on this repository and I'm not familiar with the Carthage codebase (yet) to make a PR. I use Carthage to manage my apps' dependencies, and I also use the
outdated
subcommand as part of the build process (as an Xcode build phase, with--xcode-warnings
) to be notified of updates to dependencies. Both updating and checking for updates work as intended. However, in my quest for ever tighter debug turnaround times, I'm trying to decrease my debug build times as much as possible. And one part of the build turnaround is 1 to 3 seconds spent by Carthage to fetch my dependencies' repositories. It doesn't seem Xcode can parallelise this so it's a blocking second or three, on a fast connection.Unless I'm missing a command line option or implementation detail, I'm proposing that
carthage outdated
should cache its result (basically skip fetching if it has been done in the past few minutes or hours), possibly as an opt-in (or opt-out) option. It should consistently report outdated repositories regardless of whether it actually fetched anything in this run. I don't thinkcarthage update
should do any such caching since it's expected that it fetches all updates that are published as of right now.Any thoughts on this? Thanks for all the work! 😄
Configuration
which carthage
:/usr/local/bin/carthage
carthage version
: 0.31.2xcodebuild -version
: 10.1 (10B61)--no-build
? No.--no-use-binaries
? No.--use-submodules
? No.--cache-builds
? Yes.--new-resolver
? No.Cartfile
Carthage Output
(Probably) N/A — updating works as intended
Actual outcome
Carthage fetches all dependencies' repositories and build phase takes 1 to 3 seconds to finish, regardless of previous builds preceding it.
Expected outcome
Carthage should skip fetching repositories in the second build soon after the first and the build phase should complete within 0.1 second.
The text was updated successfully, but these errors were encountered: