Skip to content

utils/update-checkout error from git checkout icu maint/maint-69 #70966

Closed
@vanvoorden

Description

@vanvoorden

Description

https://github.com/apple/swift/blob/main/docs/HowToGuides/GettingStarted.md#cloning-the-project

Hi! I just tried following the cloning-the-project steps on a new (vanilla) swift checkout (from latest main). I'm seeing some errors on console:

Traceback (most recent call last):
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/Users/rick/Developer/swift-project/swift/utils/update_checkout/update_checkout/update_checkout.py", line 376, in obtain_additional_swift_sources
    shell.run(['git', '--git-dir',
  File "/Users/rick/Developer/swift-project/swift/utils/swift_build_support/swift_build_support/shell.py", line 257, in run
    raise eout
Exception: ['git', '--git-dir', '/Users/rick/Developer/swift-project/icu/.git', '--work-tree', '/Users/rick/Developer/swift-project/icu', 'checkout', 'maint/maint-69']

I tried running cloning-the-project again and see similar errors:

[icu]                                   + git checkout maint/maint-69
[icu]                                   error: Your local changes to the following files would be overwritten by checkout:
[icu]                                   	.ci-builds/.azure-exhaustive-tests.yml
[icu]                                   	.ci-builds/.azure-pipelines.yml
[icu]                                   	.ci-builds/data-filter.json
...
[icu]                                   error: The following untracked working tree files would be overwritten by checkout:
[icu]                                   	.appveyor.yml
[icu]                                   	.ci-builds/.azure-valgrind.yml
[icu]                                   	.github/workflows/icu_ci.yml
...
[icu]                                   	ic

Anyone seen these errors before or know the steps to work around and test building swift locally? I'm on Apple Silicon BTW. Thanks!

Reproduction

mkdir swift-project
cd swift-project
git clone https://github.com/apple/swift.git swift
cd swift
utils/update-checkout --clone-with-ssh

Expected behavior

utils/update-checkout succeeds and installs deps with no errors.

Environment

uname -a
Darwin C97RX2X127.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:55:06 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6020 arm64
sw_vers
ProductName:		macOS
ProductVersion:		14.2.1
BuildVersion:		23C71
git --version
git version 2.39.3 (Apple Git-145)
git remote -v
origin	[email protected]:apple/swift.git (fetch)
origin	[email protected]:apple/swift.git (push)
git branch
* main
git rev-parse HEAD
e7475c89edb66a26d762c6e9a24c9bdb1a80b87a

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.swift 6.0unexpected errorBug: Unexpected errorupdate-checkoutArea → utils: the `update-checkout` scriptutilsArea: the build system and other accessory scripts under the "utils" directory

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions