Skip to content

[build-presets] Remove explicit =1 for impl params #1745

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 1 commit into from
Mar 22, 2016

Conversation

modocache
Copy link
Contributor

What's in this pull request?

The utils/build-script-impl shellscript takes arguments in the form of --foo=bar or --baz. In the second form, the argument is automatically interpreted as --baz=1. There is no need to manually specify =1, so remove it from the build presets.

There is another reason to do this: the argument parser used by the Python utils/build-script is not as loose as the shellscript's. For a boolean switch such as --baz, the argument parser throws an exception if given a numerical value such as --baz=1. Therefore attempts to migrate certain parameters from the shellscript to the Python build script will encounter trouble when dealing with these explicit --baz=1 parameters in the build presets.

This commit does not touch any of the --foo=0 parameters. Although they should be removed, it's trickier due to the inheritance of the build presets, and so I will do so in a later commit.

Resolved Related bug number: (SR-237)


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
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
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

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

The `utils/build-script-impl` shellscript takes arguments in the form of `--foo=bar` or `--baz`. In the second form, the argument is automatically interpreted as `--baz=1`. There is no need to manually specify `=1`, so remove it from the build presets.

There is another reason to do this: the argument parser used by the Python `utils/build-script` is not as loose as the shellscript's. For a boolean switch such as `--baz`, the argument parser throws an exception if given a numerical value such as `--baz=1`. Therefore attempts to migrate certain parameters from the shellscript to the Python build script will encounter trouble when dealing with these explicit `--baz=1` parameters in the build presets.

This commit does not touch any of the `--foo=0` parameters. Although they should be removed, it's trickier due to the inheritance of the build presets, and so I will do so in a later commit.
@tkremenek
Copy link
Member

@swift-ci Please test

@modocache
Copy link
Contributor Author

Is this good to merge? There's no functional change here (sorry, should have mentioned that in the commit message).

@gottesmm
Copy link
Contributor

This LGTM.

gottesmm added a commit that referenced this pull request Mar 22, 2016
…explicit-1

[build-presets] Remove explicit =1 for impl params
@gottesmm gottesmm merged commit b374808 into master Mar 22, 2016
@modocache modocache deleted the build-presets-shellscript-params-explicit-1 branch March 22, 2016 06:33
@modocache
Copy link
Contributor Author

Thanks!

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