-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[build-script] Perform validation after defaults propagation #2961
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
e9568a6
to
9ef3d38
Compare
cce950b
to
1e19c29
Compare
This makes sense to me. It would be great if the defaults handling moved more and more into the argument parser, which naturally means validation has to come afterwards. |
@swift-ci Please smoke test and merge |
1 similar comment
@swift-ci Please smoke test and merge |
@swift-ci Please test and merge |
@swift-ci Please smoke test |
@karwa Could you take a look at CI issues?
|
1e19c29
to
02ad66d
Compare
args.android = True | ||
args.skip_build_android = 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 there to fix a PEP error about too many blank lines. I assumed 2 lines were left blank to separate the initialiser from the massive block of parsing code above.
@gribozavr fixed. There was a big build-script change which was merged before this, leading to |
@swift-ci Please test |
@swift-ci Please smoke test |
@swift-ci Please Python lint |
@swift-ci Please test |
What's in this pull request?
Perform build-script arguments validation after defaults propagation. In general, validation should be done at late as possible. For example, if you have an android target in your
--stdlib-deployment-list
, Swift will try to configure android even though you didn't specify the--android
flag (it won't build it, because lack of--android
implies--skip-build-android
, but configuring is bad enough). Because you didn't specify the flag, we didn't validate that you gave an NDK path, etc.So we should perform validation after propagation, so we can propagate the values in the defaults function.
Resolved bug number: (SR-)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.