-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify swift-bootstrap
with swift-build
and swift-test
#8153
base: main
Are you sure you want to change the base?
Conversation
This is a prerequisite for enabling incremental builds when running `./Utillities/bootstrap build --release` and `./Utilities/bootstrap test --release` in sequence.
@swift-ci test |
@swift-ci test |
@swift-ci test |
@swift-ci test linux |
…o maxd/unify-swift-bootstrap
@swift-ci test |
…o maxd/unify-swift-bootstrap
@swift-ci test |
Mind you, I find the title funny. swift-build and swift-test aren't necessary consistent with each other. But that's a separate issue :). |
Certainly more consistent with each other WRT incremental builds than either of them is with |
Note that the point of |
Yeah, I guess I've haven't quite figured out what the bootstrap was supposed to be for. If it's doing a build, wouldn't you need the Workspace, and then yeah, why not just use swift-build? |
You wouldn't, a build system can be created without a
I'm going to refactor the PR to allow using |
Motivation:
Existing code in
swift-bootstrap
mostly followsswift-build
/swift-test
in an ad-hoc manner, but somewhat deviates from thatswift-test
such that environmental builds are not possible with the current setup. Let's unify this code to avoid the divergence and make maintenance easier.This is a prerequisite for enabling incremental builds when running
./Utillities/bootstrap build --release
and./Utilities/bootstrap test --release
in sequence.Modifications:
AsyncSwiftCommand
extensions fromCommands
toCoreCommands
.CoreCommands
toswift-bootstrap
.swift-bootstrap
from top-level code to@main
.SwiftBoostrapBuildTool
toSwiftBootstrapCommand
for consistency with other commands.AsyncSwiftCommand
conformance toSwiftBootstrapCommand
.func run(_: SwiftCommandState)
implementation toSwiftBootstrapCommand
.Result:
Made
swift-bootstrap
behavior more consistent and predictable, ~450 LoC removed.