Swift-driver compiler - how to run the output of xcode build

Hello,

I'm interested in contributing in swift-driver and/or swift compiler when I have some free time. So I've cloned the repos, I've already been approved on 2 commits on the apple/swift repo and one on apple/swift-driver.

I'm finding swift-driver interesting and trying to do some dev there (start small, with FIXME/TODO) and then get involved into bigger stuff. The challenge that I'm facing is that I don't know how to run the output of the swift-driver after building with xcode. Let's say I'm doing a change and try to manual test this how should I proceed?

Should I run it using Xcode? But what if I'm trying to test the swift build command?

Thank you!

See the Getting Started section of the readme. https://github.com/apple/swift-driver#getting-started Specifically the last part about how to use it in XCode.

Most tests are done using either XCTests or the lit tests in apple/swift.

Yup, I tried doing that. Here (https://github.com/apple/swift-driver#getting-started) the issue that I'm having is what's

/path/to/built/swift-driver

in this case? The output of Xcode's build for swift-driver? That should be in ~/Library/Developer/Xcode/DerivedData ?

Thanks!

Uh yeah I guess so. I’ve only ever used the spm output built product in Xcode and that was a while ago. I rely mostly on the tests now.

SPM executable can be found: .build/debug/swift-driver
Change debug for release if you are building for release.

If I'm running swift build in the swift-driver repo, i don't get any build folder as on swift main source. I only get this output:

 → swift build
Fetching https://github.com/apple/swift-llbuild.git
Fetching https://github.com/apple/swift-tools-support-core.git
Fetching https://github.com/jpsim/Yams.git
Cloning https://github.com/jpsim/Yams.git
Resolving https://github.com/jpsim/Yams.git at master
Cloning https://github.com/apple/swift-tools-support-core.git
Resolving https://github.com/apple/swift-tools-support-core.git at master
Cloning https://github.com/apple/swift-llbuild.git
Resolving https://github.com/apple/swift-llbuild.git at master
: "Unable to include 'swift/Option/Options.inc', `makeOptions` will not be usable" [-W#warnings]
#warning "Unable to include 'swift/Option/Options.inc', `makeOptions` will not be usable"
 ^
1 warning generated.
[274/274] Linking swift-driver

→ ls
CMakeLists.txt   LICENSE.txt      Package.resolved Package.swift    README.md        Sources          TestInputs       Tests            Utilities        cmake

Am I doing something wrong?

Is .build hidden? ls -lah

Oh wow, that's some rookie mistake. thanks! :))

Terms of Service

Privacy Policy

Cookie Policy