-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix the build-script --skip-build option. #29500
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
Conversation
@swift-ci test |
Build failed |
Build failed |
@swift-ci test |
Build failed |
For some reason, the unittests fail when I run locally (although this used to work). So, this PR is trial-and-error.
|
Build failed |
@atrick That test failure was caused by a stale Python cache. |
@Rostepher I wish it was something like --only-configure. That is really what it is = /. |
I'd be fine with eventually renaming all these arguments. We could deprecate the old ones in |
This option configures the build directories without building any targets. Splitting configuration from build allows for the decoupling of build products. This decoupling is essential for the enlightened way of developing Swift where the build-script is never actually used to build anything, and build products can be independently configured. When fully supported, this avoids many unnecessary full/clean rebuilds and enables debugging by mixing-and-matching configurations and rebuilding only select products after a change. Sadly, the option has degraded, and a recent commit rendered it fully broken: commit 34848e6 Author: Alex Langford <[email protected]> Date: Wed Jan 22 19:27:44 2020 [build] Unify logic to skip building projects in build-script-impl The breaking commit was itself a reasonable cleanup. The underlying problem was the original --skip-build was implemented using hacks that conflated configuration with build. This fix reinstates a reasonable situation: --skip-build has no effect on configuration, as documented. It merely skips building the targets. This is how it must behave to work as intended. --skip-build-{product} and its inverse --build-{product} controls which products will be configured. These options are in heavy use throughout the scripts, so changing the name (e.g. to --skip-config) would be disruptive and of questionable benefit. None of this changes the fact that any required build logic that people have dumped into build-script-impl still effectively breaks the enlightened way of building Swift, particularly when building toolchain components.
@swift-ci smoke test |
I don't particularly like the names, but this implementation in this PR now matches the existing documentation of those option names. This is completely blocking me, so any additional cleanup should be proposed in a separate PR. |
@swift-ci smoke test |
What we discussed was that it would replace the old options - how come those are not removed? |
We can remove them in follow-up PRs. This turned out to be blocking both @atrick and others. |
@compnerd the existing |
This option configures the build directories without building any
targets. Splitting configuration from build allows for the decoupling
of build products. This decoupling is essential for the enlightened
way of developing Swift where the build-script is never actually used
to build anything, and build products can be independently
configured. When fully supported, this avoids many unnecessary
full/clean rebuilds and enables debugging by mixing-and-matching
configurations and rebuilding only select products after a change.
Sadly, the option has degraded, and a recent commit rendered it fully broken:
commit 34848e6
Author: Alex Langford [email protected]
Date: Wed Jan 22 19:27:44 2020
The breaking commit was itself a reasonable cleanup. The underlying
problem was the original --skip-build was implemented using hacks that
conflated configuration with build.
This fix reinstates a reasonable situation:
--skip-build has no effect on configuration, as documented. It merely
skips building the targets. This is how it must behave to work as
intended.
--skip-build-{product} and its inverse --build-{product} controls
which products will be configured. These options are in heavy use
throughout the scripts, so changing the name (e.g. to --skip-config)
would be disruptive and of questionable benefit.
None of this changes the fact that any required build logic that
people have dumped into build-script-impl still effectively breaks the
enlightened way of building Swift, particularly when building
toolchain components.