Max*_*ler 6 git github git-submodules ios-frameworks carthage
我已经使用 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:
Run Code Online (Sandbox Code Playgroud)
回购的新克隆提供以下内容:
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"
Run Code Online (Sandbox Code Playgroud)
Cartfile.private
? IKnowKungFu git:(master) cat Cartfile.private
github "Quick/Quick"
github "Quick/Nimble"
Run Code Online (Sandbox Code Playgroud)
.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
Run Code Online (Sandbox Code Playgroud)
.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
Run Code Online (Sandbox Code Playgroud)
进一步的研究表明 Carthage 更新了 .gitmodules 条目Carthage/Checkouts/CleanroomASL,Carthage/Checkouts/CleanroomLogger但未能创建160000目录指针以允许克隆子模块。
我所做的一切似乎都无法解决这个问题。包含
rm -rf ~/Library/Caches/org.carthage.CarthageKit 我对如何解决这个问题一无所知。