Carthage/Carthage

Carthage update doesn't checkout repository correctly when there's already code in Carthage/Checkouts

Offen

#2.621 geöffnet am 22.10.2018

 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Swift (1.544 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (15.179 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

  • carthage install method: [ ] .pkg, [X ] homebrew, [ ] source
  • which carthage: /usr/local/bin/carthage
  • carthage version: 0.31.1
  • xcodebuild -version: Xcode 10.0 Build version 10A255
  • Are you using --no-build? NO
  • Are you using --no-use-binaries? NO
  • Are you using --use-submodules? NO
  • Are you using --cache-builds? NO
  • Are you using --new-resolver? NO

Cartfile

github "AzureAD/microsoft-authentication-library-for-objc" "master"

Carthage Output

Olgas-MBP-2:ios-objectivec-connect-rest-sample olgadalton$ carthage update
*** Fetching microsoft-authentication-library-for-objc
*** Checking out microsoft-authentication-library-for-objc at "aba7aadb6dbf3830347e5c49c0316b8985997cb3"
*** xcodebuild output can be found in /var/folders/21/clm7kdtx01sc5964r45b01h00000gn/T/carthage-xcodebuild.HS6Li1.log
*** Building scheme "MSAL (Mac Framework)" in MSAL.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/olgadalton/Desktop/connect-sample-2/ios-objectivec-connect-rest-sample/Carthage/Checkouts/microsoft-authentication-library-for-objc/MSAL.xcworkspace -scheme MSAL\ (Mac\ Framework) -configuration Release -derivedDataPath /Users/olgadalton/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/microsoft-authentication-library-for-objc/aba7aadb6dbf3830347e5c49c0316b8985997cb3 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/21/clm7kdtx01sc5964r45b01h00000gn/T/microsoft-authentication-library-for-objc SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/olgadalton/Desktop/connect-sample-2/ios-objectivec-connect-rest-sample/Carthage/Checkouts/microsoft-authentication-library-for-objc)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/21/clm7kdtx01sc5964r45b01h00000gn/T/carthage-xcodebuild.HS6Li1.log

Actual outcome There seems to be an issue with carthage update, when there're already contents in Carthage/Checkouts. The issue is always reproducible in this repository.

The setup is following:

  • The repository points to MSAL "master", which is currently 0.2.0 version. However, it also has previous MSAL version checked in under Carthage/Checkouts (0.1.1). The previous MSAL version didn't use git submodules. The new MSAL version is using git submodules.
  • When checking out the repository and running carthage update, Carthage reports that correct commit was checked out, but instead does something strange: the top level folder of MSAL gets updated, the git submodule is updated correctly, but the src folder is not updated correctly, as it has old files from previous MSAL version that are now moved or deleted. Therefore, build always fails.
  • When running rm -rf Carthage/* before carthage update, everything works as expected. Carthage checks out correct version of MSAL and build succeeds.
  • It might be related to addition of git submodules, as previous updates worked successfully.

Expected outcome Carthage checks out correct version of the framework and doesn't leave src folder un-updated. Carthage build succeeds without having to delete previous checkouts before running carthage update

Contributor Guide