Skip to content

Affirmative names for argument parsing namespace destinations. #11952

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 5 commits into from
Sep 15, 2017

Conversation

Rostepher
Copy link
Contributor

Purpose

The main goal for this PR is to rename all argument-parsing namespace destinations of the form skip_build_* and skip_test_* to a more consistent and affirmative build_* and test_* respectively. It also corrects the discrepancy between build_*_device and test_*_host, now all the test variables will be test_*_device as well. The actual argument option strings have not been changed in anyway, these renames are all under-the-hood so to speak.

This PR should be the last step necessary to pave the way for #11827.

rdar://34336890

@Rostepher
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable to me. Can you add some documentation where I asked below on those two classes?


def __call__(self, parser, namespace, values, option_string=None):
setattr(namespace, self.dest, values)


_register(action, 'optional_bool', _OptionalBoolAction)


class _OptionalTrueAction(_OptionalBoolAction):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add documentation for this and the other option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing! I don't expect these classes and really this entire module to hang around for very long, I just needed this particular behavior sooner than later.

@Rostepher
Copy link
Contributor Author

@swift-ci please smoke test

@Rostepher Rostepher merged commit ef7c951 into swiftlang:master Sep 15, 2017
@Rostepher Rostepher deleted the affirmative-build-dests branch September 15, 2017 23:21
@davezarzycki
Copy link
Contributor

This broke my "fast debug build" setup. Ninja now fails to start with the following error: '/Volumes/data/wt/swift/master/swift/tools/SwiftSyntax/swiftFoundation-swiftmodule-macosx-x86_64', needed by 'tools/SwiftSyntax/macosx/x86_64/SwiftSyntax.o', missing and no known rule to make it

My build script:

#!/bin/sh

time nice ./utils/build-script \
	--build-subdir="$(dirname $PWD)/d" \
	--llvm-targets-to-build X86 \
	--skip-ios --skip-tvos --skip-watchos \
	--skip-build-benchmarks true \
	--build-swift-static-stdlib false \
	--build-swift-static-sdk-overlay false \
	--build-swift-dynamic-sdk-overlay false \
	--build-swift-stdlib-unittest-extra false \
	-r \
	--debug-swift \
	--debug-swift-stdlib \
	"$@"

@davezarzycki
Copy link
Contributor

I've filed a bug: https://bugs.swift.org/browse/SR-5911

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.

3 participants