EarlGrey needs to be built twice via Carthage so that OCMock gets built as well
- Dominant language
- Objective-C
- Stars
- 5.7k
- Forks
- 737
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 5
Description
Xcode 10.2
Build version 10E125
Cartfile:
```
github "google/EarlGrey" "master"
```
Let's initialize `Cartfile.resolved` via update, but not build yet:
``` $ carthage update --no-build```
Cartfile.resolved:
```
github "google/EarlGrey" "87ffa7ac2517cc8931e4e6ba11714961cbac6dd7"
```
At this point, the `Carthage/Checkouts/EarlGrey` folder has been populated with the following:
```
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 25082 Apr 12 10:43 CHANGELOG.md
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 6039 Apr 12 10:43 CONTRIBUTING.md
drwxr-xr-x 4 jblahunka SKYDIVE\Domain Users 128 Apr 12 10:43 Demo
drwxr-xr-x 17 jblahunka SKYDIVE\Domain Users 544 Apr 12 10:43 EarlGrey
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 1265 Apr 12 10:43 EarlGrey-Info.plist
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 1749 Apr 12 10:43 EarlGrey.podspec.json
drwxr-xr-x 5 jblahunka SKYDIVE\Domain Users 160 Apr 12 10:43 EarlGrey.xcodeproj
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 29977 Apr 12 10:43 LICENSE
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 5578 Apr 12 10:43 README.md
drwxr-xr-x 8 jblahunka SKYDIVE\Domain Users 256 Apr 12 10:43 Scripts
drwxr-xr-x 4 jblahunka SKYDIVE\Domain Users 128 Apr 12 10:43 Tests
drwxr-xr-x 14 jblahunka SKYDIVE\Domain Users 448 Apr 12 10:43 docs
drwxr-xr-x 12 jblahunka SKYDIVE\Domain Users 384 Apr 12 10:43 gem
```
Let's try building the framework:
```$ carthage build --platform iOS --cache-builds EarlGrey
*** No cache found for EarlGrey, building with all downstream dependencies
*** xcodebuild output can be found in /var/folders/48/sy74dwmd3_n9ym1dc0fh1fhhj37rwj/T/carthage-xcodebuild.p1bMKl.log
*** Building scheme "EarlGrey" in EarlGrey.xcodeproj
```
which produces the following in `Carthage/Build/iOS`:
```
drwxr-xr-x 7 jblahunka SKYDIVE\Domain Users 224 Apr 12 11:06 EarlGrey.framework
drwxr-xr-x 3 jblahunka SKYDIVE\Domain Users 96 Apr 12 11:06 EarlGrey.framework.dSYM
```
However there is no `OCMock`! When I inspect the checkout folders, I can now see a new entry `OCHamcrest.framework`:
```
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 25082 Apr 12 11:04 CHANGELOG.md
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 6039 Apr 12 11:04 CONTRIBUTING.md
drwxr-xr-x 4 jblahunka SKYDIVE\Domain Users 128 Apr 12 11:04 Demo
drwxr-xr-x 17 jblahunka SKYDIVE\Domain Users 544 Apr 12 11:04 EarlGrey
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 1265 Apr 12 11:04 EarlGrey-Info.plist
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 1749 Apr 12 11:04 EarlGrey.podspec.json
drwxr-xr-x 5 jblahunka SKYDIVE\Domain Users 160 Apr 12 11:04 EarlGrey.xcodeproj
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 29977 Apr 12 11:04 LICENSE
drwxr-xr-x 6 jblahunka SKYDIVE\Domain Users 192 Apr 12 11:05 OCHamcrest.framework
-rw-r--r-- 1 jblahunka SKYDIVE\Domain Users 5578 Apr 12 11:04 README.md
drwxr-xr-x 8 jblahunka SKYDIVE\Domain Users 256 Apr 12 11:05 Scripts
drwxr-xr-x 4 jblahunka SKYDIVE\Domain Users 128 Apr 12 11:04 Tests
drwxr-xr-x 14 jblahunka SKYDIVE\Domain Users 448 Apr 12 11:04 docs
drwxr-xr-x 7 jblahunka SKYDIVE\Domain Users 224 Jan 20 2016 fishhook
drwxr-xr-x 12 jblahunka SKYDIVE\Domain Users 384 Apr 12 11:04 gem
```
Let's rebuild the framework:
```
$ rm -rf Carthage/Build
$ carthage build --platform iOS --cache-builds EarlGrey
*** No cache found for EarlGrey, building with all downstream dependencies
*** xcodebuild output can be found in /var/folders/48/sy74dwmd3_n9ym1dc0fh1fhhj37rwj/T/carthage-xcodebuild.pwKX6R.log
*** Building scheme "EarlGrey" in EarlGrey.xcodeproj
*** Building scheme "OCMock iOS" in OCMock.xcodeproj
```
Suddenly the `OCMock` framework appears in the `Carthage/Build/iOS` folder:
```
-rw------- 1 jblahunka SKYDIVE\Domain Users 29632 Apr 12 11:13 E2F985D7-F7AC-3254-BE7F-64BF7A55CA97.bcsymbolmap
drwxr-xr-x 7 jblahunka SKYDIVE\Domain Users 224 Apr 12 11:13 EarlGrey.framework
drwxr-xr-x 3 jblahunka SKYDIVE\Domain Users 96 Apr 12 11:13 EarlGrey.framework.dSYM
-rw------- 1 jblahunka SKYDIVE\Domain Users 26770 Apr 12 11:13 FDF11BB2-FFF9-352D-8510-DB72FFA2EE02.bcsymbolmap
drwxr-xr-x 6 jblahunka SKYDIVE\Domain Users 192 Apr 12 11:13 OCMock.framework
drwxr-xr-x 3 jblahunka SKYDIVE\Domain Users 96 Apr 12 11:13 OCMock.framework.dSYM
```
Contributor guide
Research direction
Reproduce the issue with Xcode 10.2 using the shown Cartfile and the two `carthage build --platform iOS --cache-builds EarlGrey` commands. Inspect `EarlGrey.xcodeproj` and `OCMock.xcodeproj`, especially their build schemes and dependency relationships. Done means a single build produces both `EarlGrey.framework` and `OCMock.framework` in `Carthage/Build/iOS`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c
- Domain
- build-system, mobile-dev, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100