Carthage/Carthage

RFC: Per dependancy platform setting

Open

#2,294 opened on 2017年12月15日

GitHub で見る
 (15 comments) (3 reactions) (0 assignees)Swift (15,179 stars) (1,544 forks)batch import
enhancementhelp wanted

説明

I want to make a suggestion, but looking for comments before working on an implementation, I couldn't find any existing discussion of this.

The idea is to be able to specify the build platforms in the Cartfile, for each dependency. I see two main reasons for doing so:

  • When you first get a project, hit carthage bootstrap, by default it does builds for 4 platforms, but in most cases, you are only interested in one of these. If it was specified in the Cartfile you wouldn't have to know which platforms to include using --platforms at bootstrap.
  • When you have mixed project, e.g. iOS app with watchOS embedded, you often have some dependencies that only need to be built for iOS, so that only need to be built for watchOS, and some for both. When using --platforms all your deps get built for iOS and watchOS.

It would require extending the Cartfile syntax, something like:

github "jdhealy/PrettyColors" ~> 5.0, platforms: iOS, watchOS
github "ReactiveCocoa/ReactiveSwift" ~> 3.0, platforms: iOS

Most likely the --platforms argument would override this, and build for everything specified

I think this can improve build times quite significantly.

コントリビューターガイド