-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Build Script] Fix --infer
with earlyswiftdriver
.
#37349
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 please test |
Build failed |
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test |
Build failed |
@swift-ci please test |
Build failed |
@swift-ci please test Linux platform |
Build failed |
@swift-ci please test Linux platform |
Why don't we make swift-driver a dependency of everything rather than adding in special behavior. Feel free to delete cross dependencies. |
ad8542f
to
a6b4e36
Compare
@swift-ci please test |
Good idea. Changed to this. |
bbf55fa
to
c0a5832
Compare
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test |
@swift-ci please test Windows platform |
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me. Fix the comment issues and then let err rip.
@@ -1148,8 +1151,13 @@ class BuildScriptInvocation(object): | |||
print("--- Running tests for %s ---" % product_name) | |||
product.test(host_target) | |||
print("--- Finished tests for %s ---" % product_name) | |||
# Install the product if it should be installed specifically, or | |||
# if it should be built and `install_all` is set to True. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer true. CMark I think does install things and is now an early product. So I would say products like early-swift-driver which are before_build_script_impl products that are never installed.
@@ -32,10 +33,11 @@ def is_before_build_script_impl_product(cls): | |||
""" | |||
return True | |||
|
|||
# This is the root of the build-graph, so it doesn't have any dependencies. | |||
# EarlySwiftDriver is the root of the graph, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Can you reflow this to 80 columns?
@@ -83,6 +83,10 @@ def should_install(self, host_target): | |||
# product with `--swift-driver --install-swift-driver`. | |||
return False | |||
|
|||
@classmethod | |||
def is_ignore_install_all_product(cls): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add your explanation from the commit msg (which is great btw) to this?
In the original implementation (swiftlang#36377), using `--infer` accidentally disables the `earlyswiftdriver` product (`before_impl_product_classes` set to always empty). This change fixes that and makes sure early SwiftDriver is always built, regardless of whether or not `--infer` is used. This change also ensures that `install_all` setting triggered by `--infer` does not affect products which specify `is_ignore_install_all_product` to return True. This is useful for products which should not be installed into the toolchain (corresponding build products that use the just-built toolchain are the products that get installed, e.g. `swiftdriver` to `earlyswiftdriver`).
@swift-ci please smoke test |
Thanks, @gottesmm . |
In the original implementation (#36377), using
--infer
accidentally disables theearlyswiftdriver
product (before_impl_product_classes
set to always empty). This change fixes that and makes sure early SwiftDriver is always built, regardless of whether or not--infer
is used.This change also ensures that
install_all
setting triggered by--infer
does not affectbefore_build_script_impl
products, which should not be installed into the toolchain (corresponding build products that use the just-built toolchain are the products that get installed, e.g.swiftdriver
toearlyswiftdriver
).