Hello everyone from the Swift community! I’m really excited to see swift-driver which is far clearer and more readable than the existing driver written in C++. I’m a little curious about the state of this project, and the questions are:
In README, we’ve listed some development goals of swift-driver, which are really exciting. Are they all implemented by the existing driver, or they contains features that the existing one isn’t going to support?
Will swift-driver be shipped with Swift toolchain before all the items on the list are checked?
Is there any estimation on which Swift version will switch to the new driver? Are we expected to see this in Swift 5.x?
If I’d like to improve the driver, should I patch on swift-driver only, or patch on both drivers?
With a couple of small exceptions (like typo correction for misspelled option names), everything on the development plan checklist is existing functionality of the C++ driver that needs to be reimplemented before swift-driver can replace it.
Starting fairly recently, nightly trunk snapshots from swift.org have started shipping with swift-driver. Using it requires some tinkering with build settings though, or using it via SPM with the --use-integrated-swift-driver flag. There's some more info on that in this post and in the swift-driver README.
Not really. swift-driver is in pretty good shape currently, but there are still a few big unimplemented features like incremental builds, and a lot of small differences in behavior and test failures that need fixing before it can ship.
It's really up to you. Any changes to the C++ driver will eventually need to be ported to swift-driver, and swift-driver shouldn't include changes that break compatibility with the C++ version, but there's no requirement that you change both at the same time or restrict changes to one or the other.
Compatibility in this case means that if the C++ driver accepts a certain set of flags and inputs, swift-driver should also accept them, have the same observable behavior, and produce the same outputs. That said, swift-driver has a few major features, like explicit module builds, that don't exist in the C++ driver, so there's no need to match the behavior of those. Because the swift-driver work is still ongoing, it's also fine to change the behavior of the C++ driver and not update swift-driver's behavior to match at the same time
Thanks a lot! I’ve been curious whether swift-driver has supported cross-compilation so far. I found the toolchain and build target still require to match?