[swift-users] Trouble with initial checkout

Alex Blewitt alblue at apple.com
Thu Dec 8 05:08:02 CST 2016


If you want to use the branch swift-3.0.2-PREVIEW-1 tag then you should run update-checkout with that tag name, to ensure that you're on the right one.

You can run:

swift/utils/update-checkout --tag swift-3.0.2-PREVIEW-1

If you find that you have problems with repository state (that you didn't apply) then you can add --reset-to-remote or --clean, which will guarantee you are in a better starting point.

Alex

> On 8 Dec 2016, at 04:00, Ryan Parman via swift-users <swift-users at swift.org> wrote:
> 
> I’ve been using Git for about 8 years now, so I know my way around. But in checking out a release of Swift, I’m running into errors.
> 
> ```
> $ git clone -q -b swift-3.0.2-PREVIEW-1 https://github.com/apple/swift.git;
> Note: checking out 'dc2c3d580f52367eebaada34901a945466e947df'.
> 
> You are in 'detached HEAD' state. You can look around, make experimental
> changes and commit them, and you can discard any commits you make in this
> state without impacting any branches by performing another checkout.
> 
> If you want to create a new branch to retain commits you create, you may
> do so (now or later) by using -b with the checkout command again. Example:
> 
>  git checkout -b <new-branch-name>
> ```
> 
> So far, so good. (I also did this exact same thing with swift-3.0.1-RELEASE — same issue.)
> 
> Now, for the util scripts:
> 
> ```
> $ cd swift && \
>    ./utils/update-checkout --clone && \
>    ./utils/build-script -r \
> ;
> --- Cloning 'compiler-rt' ---
> + git clone --recursive https://github.com/apple/swift-compiler-rt.git compiler-rt
> Cloning into 'compiler-rt'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 67008, done.
> remote: Compressing objects: 100% (721/721), done.
> remote: Total 67008 (delta 461), reused 0 (delta 0), pack-reused 66286
> Receiving objects: 100% (67008/67008), 12.01 MiB | 6.94 MiB/s, done.
> Resolving deltas: 100% (54564/54564), done.
> Already on 'stable'
> Your branch is up-to-date with 'origin/stable'.
> --- Cloning 'llvm' ---
> + git clone --recursive https://github.com/apple/swift-llvm.git llvm
> Cloning into 'llvm'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 1288275, done.
> remote: Compressing objects: 100% (1733/1733), done.
> remote: Total 1288275 (delta 1048), reused 0 (delta 0), pack-reused 1286542
> Receiving objects: 100% (1288275/1288275), 288.84 MiB | 10.42 MiB/s, done.
> Resolving deltas: 100% (1065091/1065091), done.
> Checking out files: 100% (22170/22170), done.
> Already on 'stable'
> Your branch is up-to-date with 'origin/stable'.
> --- Cloning 'swift-xcode-playground-support' ---
> + git clone --recursive https://github.com/apple/swift-xcode-playground-support.git swift-xcode-playground-support
> Cloning into 'swift-xcode-playground-support'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 483, done.
> remote: Total 483 (delta 0), reused 0 (delta 0), pack-reused 482
> Receiving objects: 100% (483/483), 139.53 KiB | 0 bytes/s, done.
> Resolving deltas: 100% (301/301), done.
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> --- Cloning 'swift-corelibs-foundation' ---
> + git clone --recursive https://github.com/apple/swift-corelibs-foundation.git swift-corelibs-foundation
> Cloning into 'swift-corelibs-foundation'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 13088, done.
> remote: Compressing objects: 100% (58/58), done.
> remote: Total 13088 (delta 17), reused 0 (delta 0), pack-reused 13030
> Receiving objects: 100% (13088/13088), 8.57 MiB | 6.03 MiB/s, done.
> Resolving deltas: 100% (9875/9875), done.
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> --- Cloning 'clang' ---
> + git clone --recursive https://github.com/apple/swift-clang.git clang
> Cloning into 'clang'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 628505, done.
> remote: Compressing objects: 100% (498/498), done.
> remote: Total 628505 (delta 316), reused 15 (delta 15), pack-reused 627992
> Receiving objects: 100% (628505/628505), 128.49 MiB | 9.96 MiB/s, done.
> Resolving deltas: 100% (532138/532138), done.
> Checking out files: 100% (13004/13004), done.
> Already on 'stable'
> Your branch is up-to-date with 'origin/stable'.
> --- Cloning 'llbuild' ---
> + git clone --recursive https://github.com/apple/swift-llbuild.git llbuild
> Cloning into 'llbuild'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 7253, done.
> remote: Compressing objects: 100% (3/3), done.
> remote: Total 7253 (delta 1), reused 0 (delta 0), pack-reused 7250
> Receiving objects: 100% (7253/7253), 6.90 MiB | 4.61 MiB/s, done.
> Resolving deltas: 100% (4769/4769), done.
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> --- Cloning 'cmark' ---
> + git clone --recursive https://github.com/apple/swift-cmark.git cmark
> Cloning into 'cmark'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 8390, done.
> remote: Compressing objects: 100% (2/2), done.
> remote: Total 8390 (delta 1), reused 0 (delta 0), pack-reused 8388
> Receiving objects: 100% (8390/8390), 2.75 MiB | 1.34 MiB/s, done.
> Resolving deltas: 100% (5825/5825), done.
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> --- Cloning 'lldb' ---
> + git clone --recursive https://github.com/apple/swift-lldb.git lldb
> Cloning into 'lldb'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 196362, done.
> remote: Compressing objects: 100% (310/310), done.
> remote: Total 196362 (delta 128), reused 0 (delta 0), pack-reused 196016
> Receiving objects: 100% (196362/196362), 111.11 MiB | 9.09 MiB/s, done.
> Resolving deltas: 100% (148069/148069), done.
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> --- Cloning 'swift-corelibs-xctest' ---
> + git clone --recursive https://github.com/apple/swift-corelibs-xctest.git swift-corelibs-xctest
> Cloning into 'swift-corelibs-xctest'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 2419, done.
> remote: Compressing objects: 100% (14/14), done.
> remote: Total 2419 (delta 1), reused 0 (delta 0), pack-reused 2404
> Receiving objects: 100% (2419/2419), 494.95 KiB | 0 bytes/s, done.
> Resolving deltas: 100% (1184/1184), done.
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> --- Cloning 'swift-integration-tests' ---
> + git clone --recursive https://github.com/apple/swift-integration-tests.git swift-integration-tests
> Cloning into 'swift-integration-tests'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 280, done.
> remote: Total 280 (delta 0), reused 0 (delta 0), pack-reused 279
> Receiving objects: 100% (280/280), 38.71 KiB | 0 bytes/s, done.
> Resolving deltas: 100% (156/156), done.
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> --- Cloning 'swiftpm' ---
> + git clone --recursive https://github.com/apple/swift-package-manager.git swiftpm
> Cloning into 'swiftpm'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 16567, done.
> remote: Compressing objects: 100% (124/124), done.
> remote: Total 16567 (delta 44), reused 0 (delta 0), pack-reused 16441
> Receiving objects: 100% (16567/16567), 3.87 MiB | 3.27 MiB/s, done.
> Resolving deltas: 100% (11574/11574), done.
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> --- Cloning 'swift-corelibs-libdispatch' ---
> + git clone --recursive https://github.com/apple/swift-corelibs-libdispatch.git swift-corelibs-libdispatch
> Cloning into 'swift-corelibs-libdispatch'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 3911, done.
> remote: Compressing objects: 100% (2/2), done.
> remote: Total 3911 (delta 0), reused 0 (delta 0), pack-reused 3909
> Receiving objects: 100% (3911/3911), 1.75 MiB | 1.51 MiB/s, done.
> Resolving deltas: 100% (2704/2704), done.
> Submodule 'libkqueue' (https://github.com/mheily/libkqueue.git) registered for path 'libkqueue'
> Submodule 'libpwq' (https://github.com/mheily/libpwq.git) registered for path 'libpwq'
> Cloning into '/root/package-swift/swift-corelibs-libdispatch/libkqueue'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 4313, done.        
> remote: Compressing objects: 100% (8/8), done.        
> remote: Total 4313 (delta 1), reused 0 (delta 0), pack-reused 4305        
> Receiving objects: 100% (4313/4313), 991.03 KiB | 1.35 MiB/s, done.
> Resolving deltas: 100% (2904/2904), done.
> Cloning into '/root/package-swift/swift-corelibs-libdispatch/libpwq'...
> warning: templates not found /usr/local/git/share/git-core/templates
> remote: Counting objects: 1740, done.        
> remote: Total 1740 (delta 0), reused 0 (delta 0), pack-reused 1740        
> Receiving objects: 100% (1740/1740), 469.59 KiB | 0 bytes/s, done.
> Resolving deltas: 100% (1066/1066), done.
> Submodule path 'libkqueue': checked out '1873b1864195ff00e82bec17fa650a89c4575d41'
> Submodule path 'libpwq': checked out '23fba319ee26ae97dd4a64ff605d4bb613a016b2'
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> --- Updating '/root/package-swift/compiler-rt' ---
> + git fetch
> + git checkout stable
> Already on 'stable'
> Your branch is up-to-date with 'origin/stable'.
> + git rebase FETCH_HEAD
> Current branch stable is up to date.
> + git submodule update --recursive
> --- Updating '/root/package-swift/llvm' ---
> + git fetch
> + git checkout stable
> Already on 'stable'
> Your branch is up-to-date with 'origin/stable'.
> + git rebase FETCH_HEAD
> Current branch stable is up to date.
> + git submodule update --recursive
> --- Updating '/root/package-swift/swift-xcode-playground-support' ---
> + git fetch
> + git checkout master
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> + git rebase FETCH_HEAD
> Current branch master is up to date.
> + git submodule update --recursive
> --- Updating '/root/package-swift/swift-corelibs-foundation' ---
> + git fetch
> + git checkout master
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> + git rebase FETCH_HEAD
> Current branch master is up to date.
> + git submodule update --recursive
> --- Updating '/root/package-swift/clang' ---
> + git fetch
> + git checkout stable
> Already on 'stable'
> Your branch is up-to-date with 'origin/stable'.
> + git rebase FETCH_HEAD
> Current branch stable is up to date.
> + git submodule update --recursive
> --- Updating '/root/package-swift/llbuild' ---
> + git fetch
> + git checkout master
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> + git rebase FETCH_HEAD
> Current branch master is up to date.
> + git submodule update --recursive
> --- Updating '/root/package-swift/cmark' ---
> + git fetch
> + git checkout master
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> + git rebase FETCH_HEAD
> Current branch master is up to date.
> + git submodule update --recursive
> --- Updating '/root/package-swift/lldb' ---
> + git fetch
> + git checkout master
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> + git rebase FETCH_HEAD
> Current branch master is up to date.
> + git submodule update --recursive
> --- Updating '/root/package-swift/swift-corelibs-xctest' ---
> + git fetch
> + git checkout master
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> + git rebase FETCH_HEAD
> Current branch master is up to date.
> + git submodule update --recursive
> --- Updating '/root/package-swift/swift-integration-tests' ---
> + git fetch
> + git checkout master
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> + git rebase FETCH_HEAD
> Current branch master is up to date.
> + git submodule update --recursive
> --- Updating '/root/package-swift/swiftpm' ---
> + git fetch
> + git checkout master
> Already on 'master'
> Your branch is up-to-date with 'origin/master'.
> + git rebase FETCH_HEAD
> Current branch master is up to date.
> + git submodule update --recursive
> --- Updating '/root/package-swift/swift' ---
> + git fetch
> + git checkout master
> Checking out files: 100% (10034/10034), done.
> Previous HEAD position was dc2c3d580f... Change version string to 'swift-3.0.2-PREVIEW-1'.
> Branch master set up to track remote branch master from origin.
> Switched to a new branch 'master'
> + git rebase FETCH_HEAD
> First, rewinding head to replay your work on top of it...
> Applying: [upstream-update] Rename of namespace clang::CodeGenOptions => clang::codegenoptions. NFC.
> Using index info to reconstruct a base tree...
> M   lib/IRGen/IRGenModule.cpp
> Falling back to patching base and 3-way merge...
> Auto-merging lib/IRGen/IRGenModule.cpp
> CONFLICT (content): Merge conflict in lib/IRGen/IRGenModule.cpp
> error: Failed to merge in the changes.
> Patch failed at 0001 [upstream-update] Rename of namespace clang::CodeGenOptions => clang::codegenoptions. NFC.
> The copy of the patch that failed is found in: .git/rebase-apply/patch
> 
> When you have resolved this problem, run "git rebase --continue".
> If you prefer to skip this patch, run "git rebase --skip" instead.
> To check out the original branch and stop rebasing, run "git rebase --abort".
> 
> ./utils/update-checkout: fatal error: command terminated with a non-zero exit status 128, aborting
> make: *** [compile] Error 1
> ```
> 
> I tried following the white rabbit for a while, resolving the merge conflicts (in favor of non-HEAD), but after a while I decided that this probably wasn’t normal and I should try asking here.
> 
> Am I encountering something weird?
> 
> Thanks for any pointers.
> 
> --
> Ryan Parman
> https://github.com/skyzyx
> https://keybase.io/skyzyx
> 
> 
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users



More information about the swift-users mailing list