Skip to content

[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

Merged
merged 2 commits into from
Jun 11, 2016

Conversation

karwa
Copy link
Contributor

@karwa karwa commented Jun 9, 2016

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:

  • Test pull request on Swift continuous integration.

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

Platform Comment
All supported platforms @swift-ci Please smoke test
All supported platforms @swift-ci Please smoke test and merge
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

@karwa karwa force-pushed the validation-defaults branch from e9568a6 to 9ef3d38 Compare June 9, 2016 00:33
@karwa karwa mentioned this pull request Jun 9, 2016
1 task
@karwa karwa force-pushed the validation-defaults branch 2 times, most recently from cce950b to 1e19c29 Compare June 9, 2016 00:54
@ddunbar
Copy link
Contributor

ddunbar commented Jun 9, 2016

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.

@gribozavr
Copy link
Contributor

@swift-ci Please smoke test and merge

1 similar comment
@gribozavr
Copy link
Contributor

@swift-ci Please smoke test and merge

@gribozavr
Copy link
Contributor

@swift-ci Please test and merge

@gribozavr
Copy link
Contributor

@swift-ci Please smoke test

@gribozavr
Copy link
Contributor

@karwa Could you take a look at CI issues?

AttributeError: 'Platform' object has no attribute 'allArchs'

@karwa karwa force-pushed the validation-defaults branch from 1e19c29 to 02ad66d Compare June 10, 2016 06:35
args.android = True
args.skip_build_android = True

# ---
Copy link
Contributor Author

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.

@karwa
Copy link
Contributor Author

karwa commented Jun 10, 2016

@gribozavr fixed. There was a big build-script change which was merged before this, leading to allArchs no longer being available.

@gribozavr
Copy link
Contributor

@swift-ci Please test

@gribozavr
Copy link
Contributor

@swift-ci Please smoke test

@gribozavr
Copy link
Contributor

@swift-ci Please Python lint

@gribozavr
Copy link
Contributor

@swift-ci Please test

@gribozavr gribozavr merged commit 593d850 into swiftlang:master Jun 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants