QuickStart contribution

Configure the system


Install Xcode

mv ~/Downloads/Xcode-beta.app /Applications/
xcode-select -s /Applications/Xcode-beta.app

Install CMake and Ninja

brew install cmake ninja
port install cmake ninja

Setup Swift Repositories

git clone git@github.com:apple/swift.git
./swift/utils/update-checkout --clone --scheme master

Build Swift Compiler

Build Swift compiler without additional tools

./swift/utils/build-script --build-ninja --release-debuginfo

Build Swift Compiler with Sccache

brew install sccache
sccache  --start-server
./swift/utils/build-script \
    --cmake-c-launcher `which sccache` \
    --cmake-cxx-launcher `which sccache` \
sccache  --stop-server

Build Swift stdlib against a downloadable toolchain

mkdir workspace
cd workspace
curl -O https://swift.org/builds/development/xcode/swift-DEVELOPMENT-SNAPSHOT-2019-06-06-a/swift-DEVELOPMENT-SNAPSHOT-2019-06-06-a-osx.pkg
mkdir toolchain
xar -C toolchain -x -f swift-DEVELOPMENT-SNAPSHOT-2019-06-06-a-osx.pkg
tar -C toolchain -xzf toolchain/swift-DEVELOPMENT-SNAPSHOT-2019-06-06-a-osx-package.pkg/Payload
git clone git@github.com:apple/swift.git
./swift/utils/update-checkout --clone --scheme=stdlib_standalone
Preset $PRESET_NAME Build Type Test Debug Info
stdlib_DA_standalone,build Debug No Yes
stdlib_DA_standalone,build,test Debug Yes Yes
stdlib_RA_standalone,build Release No No
stdlib_RA_standalone,build,test Release Yes No
stdlib_RDA_standalone,build Release No Yes
stdlib_RDA_standalone,build,test Release Yes Yes

Build swift-corelibs-foundation

build swift-corelibs-foundation against a downloadable toolchain

git clone git@github.com:apple/swift.git
./swift/utils/update-checkout --clone --scheme master

[1] Manually install CMake

mkdir -p $HOME/bin
tar xfz cmake-3.14.4-Darwin-x86_64.tar.gz -C $HOME/bin
export PATH=$HOME/bin/cmake-3.14.4-Darwin-x86_64/CMake.app/Contents/bin:$PATH

[2] Manually Install Sccache:

mkdir -p $HOME/bin
tar xfz sccache-0.2.8-x86_64-apple-darwin.tar.gz -C $HOME/bin
export PATH=$HOME/bin/sccache-0.2.8-x86_64-apple-darwin:$PATH

Starter bugs

The Swift project uses JIRA for bug tracking and the bugs and enhancement requests could be found at bugs.swift.org. If you are new to the codebase, you can identify beginner tasks by searching for the bugs that have the “Starter Bug” label. Here are some beginner bugs that you can start with with today.

Swift Compiler

SR-10292: Missing fix-it to add ‘override’ keyword while trying to override a computed property
SR-9679: Spurious “enum element cannot be referenced as an instance member” error
SR-9040: Suggestion when overriding implictly unwrapped optional does not suggest making parameter implictly unwrapped
SR-9615: @escaping and inout should work together but don’t
SR-8797: Misleading diagnostic when closure parameter is missing

Standard Library

SR-8905: Gaps in String benchmarking
SR-10817: Gaps in arithmetic benchmarking / testing


SR-10584: REPL crashes when triggering code completion with tab
SR-5994: Off by one error in URL description data formatter
SR-6189: Wrong values being printed when using protocols
SR-6657: Couldn’t load ‘self’ because its value couldn’t be evaluated
SR-6156: Expression parser fails to evaluate member variable
SR-1350: REPL doesn’t correctly handle guard variable shadowing


SR-10806: workspace/symbol (open quickly)
SR-10807: textDocument/typeDefinition
SR-10808: textDocument/implementation (find impls of protocol)
SR-10809: Honour ClientCapabilities for code completion snippets


Swift Package Manager

SR-10794: Have SwiftPM suggest close commands
SR-10633: SwiftPM can’t find its own clang
SR-7828: Include name-based “fixits” whenever we do a unique name membership lookup
SR-20: Update swift –help to explain multitool support (“swift build”, etc.)
SR-9402: SwiftPM should diagnose duplicate target dependency declarations and emit a warning
SR-10616: SwiftPM: cross compilation broken in Swift 5.0.1
SR-10802: –disable-automatic-resolution doesn’t work with local packages
SR-10804: Add $(inherited) to OTHER_SWIFT_FLAGS
SR-10805: The root property in PackageModel.Sources struct should use the directory name as on disk
SR-10799: SwiftPM should have a –no-network flag that ensures no network calls are made
SR-10800: swift test should have more flexible test selection
SR-10801: swift test --filter should display summary for the entire group of tests run, not per-test
SR-10803: Descriptive Help for “swift package init –type” in SPM

Swift Infrastructure

SR-10824: Add support for XML test results to source compatibility suite
SR-10810: Create preset for LLDB macOS bots
SR-10825: Profile building and testing Swift compiler
SR-10827: Add test suite to swift-docker

Swift Corelibs Foundation

SR-10347: Parity Remove all uses of NSUnimplemented from swift-corelibs-foundation