Swift 5.5 was the first release to move some components of the compiler itself from C++ to Swift, the new
swift-help binaries (the Swift package manager binaries like
swift-test were already written in Swift).
$ ./swift-5.5-RELEASE-centos8/usr/bin/swift -h -v Swift version 5.5 (swift-5.5-RELEASE) Target: x86_64-unknown-linux-gnu /home/butta/swift-5.5-RELEASE-centos8/usr/bin/swift-help swift OVERVIEW: Swift compiler ...
Did you notice this or has it made any difference in your builds? I thought it would be good to gather feedback before the Swift devs move more components of the compiler to Swift, such as with the next libswift effort. I did hit a couple small bugs with the new swift-driver: one was fixed by @compnerd in trunk and will be in the next 5.5 snapshot build, the other is a small bug I fixed in trunk which hasn't been merged into the 5.5 branch yet.
tokei code count program reports 9.7 klocs in the old C++ Driver in
lib/Driver/, and 20.7 klocs in the new swift-driver's
Sources/. That's not apples to apples, as the third-largest Swift file in swift-driver is a port of LLVM's compilation triple parser to 1.25 klocs of Swift, whereas the old C++ Driver can include that C++ file from LLVM directly.
What do you think of the new swift-driver and moving more of the compiler to be written in Swift?