-
Notifications
You must be signed in to change notification settings - Fork 27
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
Per framework caching #35
Comments
How the repository mapping would look like? |
How about something like this?
|
I think this feature should take into consideration two current features. 1 - Currently carthage cache provides a mechanism to "white list" dependencies to not be pruned by the 2 - Carthage cache has a lock file and a |
@kingfai I don't want to stop you from implementing this, but I think I should point you to the fact that there is work in progress in the Carthage framework itself to only rebuild frameworks that are changed, which I think for most people should solve the problem in Carthage itself rather than in this framework. Carthage_Cache would then only be useful in testing environments (like the CI) or for new people entering a project in big dependency setups. The problem is, no one knows when that work will be finished and it's being worked on quite some time already. I'm seeing it getting near its end though in the last weeks, so my best guess is that it's gonna be merged in about two months or so. Here's the link: Carthage/Carthage#1489 |
Hi @Dschee , Thanks for pointing out Carthage/Carthage#1489. Avoiding rebuilding frameworks unnecessarily will definitely help speed up developer work flows. For my organization, large dependency setups and the time it takes to copy down the dependencies for a clean build would still be an issue. Nonetheless, I'm looking forward to that change and hope it comes in weeks instead of months! |
Here's a proposal of the changes I'd like to implement:
The
Let me know what you think. |
@kingfai Awesome! Thanks for such detailed description. My comments
I don't understand in which case Cartfile.resolved zip won't be found. Because as far as I understood you would always upload the full archive.
I am a little concerned about the complexity introduced by having to maintain two modes but I cannot think of better alternative. Because another option would be to introduce logic in the backend and generate an archive by demand. For example, a project publishes its full cache archive to a backend service who is responsible of unarchiving the zip file, store each precompiled framework indexed by their resolved version and the version of the compiler that was used. Then when another project wants to use Carthage cache it could send its Or maybe we could have combination of both option. Where the client only uploads the full archive and a lambda function, unzips the archive and saves the individual frameworks. If then a client uses |
Also how would generate such repository map? Would carthage cache generate automatically? |
No problem @guidomb! Here are some of my thoughts:
I'm thinking the
Those are good points. I think I was following the initial idea from #12 (comment). Perhaps it would be cleaner if we just have 2 modes as you mentioned. If one uses
The validate command could compare the contents of the Build directory with what is in Cartfile.resolved + repository_map and fail if something is missing in Build.
I think initially, a user would have to use the Your thoughts? |
Hi @guidomb , Do you have any preferences on how I submit the PR(s) for this feature? It's going to be pretty large. I could submit the changes in chunks like so if it makes sense to you:
|
Give me a couple of days to process all this. I am on business trip for the next few weeks and it's hard to find time to tackle this. I am still worried about the complexity that this would add to carthage cache and the overall benefits it provides compared to the complexity and future maintainability burden. I need some time to better articulate my arguments. Sorry for the delay.
| Guido Marucci Blas |
… On Feb 15, 2017, at 10:05 AM, Albert So ***@***.***> wrote:
Hi @guidomb ,
Do you have any preferences on how I submit the PR(s) for this feature? It's going to be pretty large. I could submit the changes in chunks like so if it makes sense to you:
granular_cache configuration
uploading
downloading
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sorry for disappearing. I wanted to let you know that Carthage has released version 0.20.0 which adds a @kingfai Thanks a lot for try to tackle this problem. I'm sorry for the time you have invested in but I strongly believe this is the best option moving forward. I'll keep this issue open for a while in case I'm missing something. |
Just a heads up that I'm pretty much done implementing this feature in house. If things change, and we end up wanting to look at the changes, I'd be happy to share it with everyone on my fork. |
Hi @guidomb,
cc: @mokagio , @Dschee
I'd like to restart the discussion that was in issue #12 .
My organization has multiple projects which share dependencies including in house dependencies. When we publish a new release of an in house dependency, we would like to publish it to the cache for all other projects to use. We would need to enhance carthage_cache to also support publishing and downloading frameworks individually.
I'd like to propose that we follow option #1 as discussed here: #12 (comment)
As for the issue about not having a way to go from a built framework back to a
Cartfile.resolved
entry (#12 (comment)), I'm thinking we can include an optional repository mapping in.carthage_cache.yml
. This is similar to how Rome solves this problem.If we have the go ahead to implement this enhancement, I'll volunteer to do most of the implementation.
Your thoughts?
The text was updated successfully, but these errors were encountered: