Carthage: Feature Request: Put everything in checkout folder then filter to "Build" folder

Created on 11 Jan 2018  ·  22Comments  ·  Source: Carthage/Carthage

As @mdiep mentioned in this ticket:

https://github.com/Carthage/Carthage/issues/2304

The user story background:

Develop want to integration whatever type of library or code
*.a , *.framework, *.h, *.m, *.swfit, even Android *.so library, doesn't matter, right?

The download module just checkout everything into "Checkout" folder, do NOT filter out anything. Carthage has cache feature, right?

Then carthage can try to compile for iOS/tvOS/MacOS/even further Android and put everything in "Build" folder.

What we are trying to archive?
Some times it's just private library, all we need is checkout the zip file and unzip. That's it.
Trying to compile for developers is over-thinking, sometimes it doesn't work that way.

@mdiep I kind of want to help you to develop this feature, If you can point out where to start, I can certainly finish this feature. Do you want me to dev this in swift?

enhancement

All 22 comments

This would only apply to binary-only frameworks, right?

Right now it's downloaded to a temporary directory; we just need to change that to be the correct checkout folder.

Yes to Swift! Carthage is Swift-only.

@mdiep I'm more welcome to any kind of library, especially someone just use this tool as a version management download tool.

We can always think about how to build something on top of these checkout stuffs. Right?

I just mean that it should only apply to binary "…" dependencies inside Cartfiles.

Then you'd be free to use whatever you wanted from the checkout folder, yes.

sorry the reactiveswift code was extremely hard to read.

I can easily find out where it parser the download job, but not sure where is the observer code in debug mode.

Could you point out where?

发自我的 iPhone

在 2018年1月20日,01:52,Matt Diephouse notifications@github.com 写道:

I just mean that it should only apply to binary "…" dependencies inside Cartfiles.

Then you'd be free to use whatever you wanted from the checkout folder, yes.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

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.

@mdiep Any updates on this feature request?

I don't think anything has been done. PRs welcome. 🙂

@mdiep Just to clarify, from development perspective, the idea
Is to change where binary depencies are downloaded - from a temporary directory to the checkout directory.

FYI

*.a , *.framework, *.h, *.m, *.swfit, even Android *.so library, doesn't matter, right?

This statement does not hold true for Carthage. There are plenty of checks to make sure that what is being downloaded & copied to the build folder is a dynamic or static framework.

The topis is not about the build folder, but before that.
Like github depencies - the are first checked out to the Checkout folder and then builded to the build folder.
For binary dependencies - they are currently downloaded to an unknown temporary directory and then, if valid as you said - copied to the Build folder.

From what I understand - this enhancement is about to make the downloaded depencies abailable inside the Checkout folder upon download, and then if they are valid - put them inside the Build folder.

So I don’t see how that does not hold true for Carthage.

If I understand this correctly, the suggested and accepted idea is to change the download folder, form a temporary directory, to a folder inside the Carthage working directory

Binary dependencies downloads are unchecked but as you correctly said, checks happen before copy.

Exactly. I'm talking about the binary dependencies downloads only. The copy to the build folder should continue working as expected.

As @mdiep said:

Right now it's downloaded to a temporary directory; we just need to change that to be the correct checkout folder.

@blender @mdiep @ikesyo I'm trying to understand how to get access to the downloaded binary dependencies which are missing from the Carthage working directory.
I've looked around and ended up on this issue and got the impression that this was a feature request that was not implemented, so i tried to jump in and make sure we are on the same page.
Then, while waiting for response, i submitted an issue (#2525), which was shortly marked as duplicate of #2449 which is referenced to #2478
Looking trough them i can't understand what is the current situation on the topic.

Is there a solution or is it rejected or is it still on hold due to something or is it currently in development?
Can anybody share more information on it?
If there is already an existing solution for this or an alternative, please let me know.
As i mention in #2525 - i'm using carthage update --no-build.

Then, while waiting for response, i submitted an issue (#2525), which was shortly marked as duplicate of #2449 which is referenced to #2478

2449 is about how carthage update --no-build doesn't download binary dependencies.

This issue is requesting that the archives from binary dependencies be extracted to Carthage/Checkout/ before the frameworks are copied to Carthage/Build. I believe this feature request is still a valid request and something we could support if someone wants to submit a PR.

It sounds like you're interested in #2449, which is separate from this issue.

I tought that this issue and #2449 are the same, because my expectations are that upon carthage update —no-build - binary depencies would be available at Carthage/Checkout folder.

So I’m really interested in

This issue is requesting that the archives from binary dependencies be extracted to Carthage/Checkout/ before the frameworks are copied to Carthage/Build. I believe this feature request is still a valid request and something we could support if someone wants to submit a PR.

Any considerations or requirements i should consider before diving into the code?

I tought that this issue and #2449 are the same

No they aren't. 1: Moving contents in a zip file to Carthage/Checkouts, and 2: the issue that binary depndencies (zip files) are __not downloaded completely__ with --no-build option, are totally different (as @mdiep explained above). This is a feature request but #2449 is a bug. Even if #2449 is fixed this issue will not be resolved so should be tackled separately.

Thanks for the clarification, i got the difference now.

I've noticed that binary dependencies are not downloaded when using the checkout or carthage bootstrap --no-build command. Because of this, existing binary dependencies defined in the Cartfile.resolved cannot be resolved.
Should this be approached, discussed and resolved separately or we can consider it as part of this feature request?

I've noticed that binary dependencies are not downloaded when using the checkout or carthage bootstrap --no-build command. Because of this, existing binary dependencies defined in the Cartfile.resolved cannot be resolved.
Should this be approached, discussed and resolved separately or we can consider it as part of this feature request?

That is #2449.

@mdiep @blender Ready for review :)

Any chance the related PR (https://github.com/Carthage/Carthage/pull/2532) could be resurrected? I'd find this particularly useful for FirebaseCrashlytics which distributes some binaries (non-framework) for uploading dSYMs to their service. Check out any of the zip files referenced in:

https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json

Was this page helpful?
0 / 5 - 0 ratings