6

我使用 Carthage 将几个框架导入为 git 子模块。供参考,repo 可在github上找到。

Carthage 创建了混合配置,导致无法构建新克隆的副本:

➜  IKnowKungFu git:(master) carthage update
*** Fetching Nimble
*** Fetching Quick
*** Fetching CleanroomLogger
*** Fetching CleanroomASL
Parse error: expected submodule commit SHA in output of task (ls-tree -z HEAD Carthage/Checkouts/CleanroomLogger) but encountered:

回购的新克隆提供以下内容:

  • Carthage/Checkouts/Nimble
  • Carthage/Checkouts/Quick

存在但为空文件夹。

运行后git submodule update --init --recursive

  • Carthage/Checkouts/Nimble
  • Carthage/Checkouts/Quick
  • Carthage/Checkouts/Quick/Externals/Nimble

已签出。然而没有记忆:

  • Carthage/Checkouts/CleanroomASL
  • Carthage/Checkouts/CleanroomLogger

购物车文件

➜  IKnowKungFu git:(master) cat Cartfile
github "emaloney/CleanroomLogger"

购物车文件.private

➜  IKnowKungFu git:(master) cat Cartfile.private
github "Quick/Quick"
github "Quick/Nimble"

.gitmodules

➜  IKnowKungFu git:(master) cat .gitmodules
[submodule "Carthage/Checkouts/CleanroomASL"]
    url = https://github.com/emaloney/CleanroomASL.git
[submodule "Carthage/Checkouts/CleanroomLogger"]
    path = Carthage/Checkouts/CleanroomLogger
    url = https://github.com/emaloney/CleanroomLogger.git
[submodule "Carthage/Checkouts/Nimble"]
    path = Carthage/Checkouts/Nimble
    url = https://github.com/Quick/Nimble.git
[submodule "Carthage/Checkouts/Quick"]
    path = Carthage/Checkouts/Quick
    url = https://github.com/Quick/Quick.git

.gitignore

➜  IKnowKungFu git:(master) cat .gitignore
###
### https://github.com/github/gitignore/blob/master/Swift.gitignore
###

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md

fastlane/report.xml
fastlane/screenshots


###
### https://github.com/github/gitignore/blob/master/Global/OSX.gitignore
###

.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

更新 1

进一步的研究表明 Carthage 更新了 .gitmodules 条目Carthage/Checkouts/CleanroomASLCarthage/Checkouts/CleanroomLogger但未能创建160000个目录指针以允许克隆子模块。

我所做的一切似乎都无法解决这个问题。包含

  • 从 .gitmodules 手动删除 Cleanroom 条目
  • 擦除本地 Carthage 文件夹
  • rm -rf ~/Library/Caches/org.carthage.CarthageKit

我对如何解决这个问题一无所知。

更新 2

提交了错误报告https://github.com/Carthage/Carthage/issues/1146

4

0 回答 0