Skip to content

[build-script] Move parts of BuildScriptInvocation into HostSpecificConfiguration #23915

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

drodriguez
Copy link
Contributor

The calculation of the platforms to build/test were only used by HostSpecificConfiguration, but were done in BuildScriptInvocation, and to make things work, the full BuildScriptInvocation object was passed down onto HostSpecificConfiguration. The changes in this commit move the code into HostSpecificConfiguration, and only pass args into it to let itself calculate the platforms to build/test.

This will allow in the future that HostSpecificConfiguration can to be removed from the main script file, can be tested and can be used by several parts of the build script process. During a transition period, it will be useful for the builder that delegates to build-script-impl, but in the end, it might only be useful for the Swift builder.

This commit is part of #23810 which was reverted in #23861. This commit only deals moving pieces of BuildScriptInvocaton into HostSpecificConfiguration.

This was part of #23257. I’m trying to split the PR in smaller ones to make the reviews easier. Other PRs in this group are #23303, #23803, #23810, and #23822, #23865.

…onfiguration.

The calculation of the plaforms to build/test were only used by HostSpeficicConfiguration, but were done in BuildScriptInvocation, and to make things work, the full BuildScriptInvocation object was passed down onto HostSpecificConfiguration. The changes in this commit move the code into HostSpecificConfiguration, and only pass `args` into it to let itself calculate the platforms to build/test.

This will allow in the future that HostSpecificConfiguration can to be removed from the main script file, can be tested and can be used by several parts of the build script process. During a transition period, it will be useful for the builder that delegates to build-script-impl, but in the end, it might only be useful for the Swift builder.
Copy link
Contributor

@Rostepher Rostepher left a comment

Choose a reason for hiding this comment

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

This seems like a fairly simple non-functional change. LGTM!

@compnerd
Copy link
Member

@swift-ci please test and merge

@swift-ci swift-ci merged commit 0de62cb into swiftlang:master Apr 11, 2019
@drodriguez drodriguez deleted the build-script-host-specific-configuration-take-2 branch April 11, 2019 19:13
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