schwa / punic

[DEPRECATED] Clean room reimplementation of Carthage tool
0 stars 1 forks source link

Support framework binaries #69

Open kkodev opened 7 years ago

kkodev commented 7 years ago

It would be very useful if punic was able to download framework binaries from GitHub releases when available, like carthage does.

schwa commented 7 years ago

Unless there is an extremely compelling reason that you need this feature (example: binary only frameworks) I'm inclined to not include this in the roadmap.

Because Punic doesn't do a clean build every time you really don't get a huge speed up with this feature. It's unsafe to link to binary frameworks built with different swift compilers right now and it'll be a while until that changes. I recommend against downloading binary frameworks.

Will keep this ticket open for a while but do intend to close it unless there's a very very good case to be made for this feature.

justin commented 7 years ago

I would like to see this feature too! +1!!!

kkodev commented 7 years ago

This may be true for majority of people / frameworks, but in a large project, with 30+ inhouse dependencies, dozens of developers and CI pipeline, time saved overshadows issues you mentioned by far. It is relatively cheap to sacrifice the whole day of 1 person to rebuild everything with new compiler whenever it's released, if you save multiple days waiting for builds in the process.

This honestly is the only reason we use carthage.

schwa commented 7 years ago

You can use the built-in cache functionality for that though.. As long as you're ok hosting the binaries on S3.

Allowing downloads of random binaries from random GitHub repos built with whatever version of Xcode the developer was using at the time is a recipe for disaster (and having experienced such disaster is one of the primary reasons why I never included support for it in punic)

kkodev commented 7 years ago

Totally agree about random. But in case of large enterprise repo, downloading specific binaries built with specific Xcode versions can make your life easier. Anyway I'll do some benchmarks to see how Punic performs vs Carthage + binaries and report back, maybe good cache implementation is indeed an answer.

schwa commented 7 years ago

It's possible making this an opt-in (perhaps on a per repo basis via Punic.yaml file) would be the best of both worlds. I'll leave issue open. Not sure if I have time to implement right now.

Punic's main speed ups over Carthage are when you're doing multiple builds - the first build will be the same speed (potentially slower if Carthage is fetching binaries).

The other speed up is due to the way punic interfaces with xcodebuild vs how Carthage does it. This is especially visible on slow CI servers like Travis - often Carthage builds will time out due to a deadlock when Carthage communicates with xcodebuild. Punic doesn't suffer from the same issues here. This generally doesn't make a difference on desktop class computers but CI build boxes (esp. Travis) are underpowered and will cause problems with Carthage.

kkodev commented 7 years ago

Oh yes, I absolutely meant this as an opt-in, majority of the users probably shouldn't use it as you mentioned.

schwa commented 7 years ago

(For reference too: https://github.com/Carthage/Carthage/pull/1760)