What Does 'update-checkout' Actually Do?

Hi, I'm just wondering if someone can point me towards more in-depth info on what update-checkout does?

I've made one successful contribution to CoreLibs Foundation, and now, a number of weeks later, I'd like to work on another, but I'm unclear on how to update my local swift-corelibs-foundation directory so that it has the latest code.

Do I use update-checkout or do I need to manually pull down the changes from origin and merge them?

Any help greatly appreciated!

Using update-checkout seems like the right thing for you to do here. You probably don't have any local-only changes if your earlier changes were merged to master.

update-checkout is nice because it'll sync all of the different projects you need to build Swift: lldb, swiftpm, clang, llvm, test, cmark, swift, swift-corelibs-foundation, llbuild, and swift-corelibs-xctest. (You'd run it from the parent folder of swift-corelibs-foundation, which should have all those other projects.)

You can sort of see the utility of the script here, where the configuration for swift-5.0-branch uses llvm's swift-4.1-branch, but swift-corelibs-foundation uses the master branch. If you were swapping around which version of Swift you were writing code for frequently, it might be a pain to sync all of those disparate versions by hand.

Thank you Kyle, That's exactly what I needed to know.

1 Like