[swift-build-dev] Swift development workflow

Daniel Dunbar daniel_dunbar at apple.com
Thu Jan 21 10:43:12 CST 2016

> On Jan 21, 2016, at 7:17 AM, Phat le tan via swift-build-dev <swift-build-dev at swift.org> wrote:
> Hi,
> My "swift --version" is: 
> "Apple Swift version 2.2-dev (LLVM 3ebdbb2c7e, Clang f66c5bb67b, Swift 42591f7cba)
> Target: x86_64-apple-macosx10.9 "
> I made change on: "swiftpm/Sources/swift-build/main.swift" which change s line 106 to: print("Apple Swift Package Manager 0.2")
> I ran "swift/utils/build-script --swiftpm --llbuild" successfully but when I ran command: "swift build --version"
> I still got: Apple Swift Package Manager 0.1

That script builds a development version of the package manager, it doesn't replace your existing tools (usually not what you want during development).

You can find the built product at:
(or similar, depending on the exact options you used).

You can run it by executing that file directly (in place of "swift build").

For making changes, you can also do development in a test driven development fashion. One easy way is by using the bootstrap script directly and passing "--test". You can find information on using the bootstrap script here:
or you can find its invocation from the output of the "build-swift" script.

We do not currently have a convenient end-to-end build process that will build everything into a new toolchain that you can then use exactly like the one you downloaded.

 - Daniel

> Can you share the workflow for making changes, debug swiftpm project?
> Thanks,
> Phat Le
> _______________________________________________
> swift-build-dev mailing list
> swift-build-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-build-dev

More information about the swift-build-dev mailing list