Skip to content

refactor CLI options #4190

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
Mar 3, 2022
Merged

refactor CLI options #4190

merged 2 commits into from
Mar 3, 2022

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Mar 3, 2022

motivation: fix an issue when not all options are presented as expected, and make the code clearer to reason about

changes:

  • rename SwiftToolOptions to GlobalOptions
  • refactor SwiftToolOptions (GlobalOptions) to multiple groups per domains: locations, caching, logging, build, linker, etc
  • set GlobalOptions "hiddenFromHelp" flag to false for swift-build, swift-test and swift-package
  • move enableCodeCoverage from GlobalOptions to TestToolOptions, since they apply there
  • refactor code that construct test build to pass in more fine grained options rather than take the entire global options model
  • adjust call sites and test

rdar://82658867

motivation: fix an issue when not all options are presented as expected, and make the code clearer to reason about

changes:
* rename SwiftToolOptions to GlobalOptions
* refactor SwiftToolOptions (GlobalOptions) to multiple groups per domains: locations, caching, logging, build, linker, etc
* set GlobalOptions "hiddenFromHelp" flag to false for swift-build, swift-test and swift-package
* move enableCodeCoverage from GlobalOptions to TestToolOptions, since they apply there
* refactor code that construct test build to pass in more fine grained options rather than take the entire global options model
* adjust call sites and test

rdar://82658867
@tomerd
Copy link
Contributor Author

tomerd commented Mar 3, 2022

@swift-ci please smoke test

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Mar 3, 2022
@tomerd
Copy link
Contributor Author

tomerd commented Mar 3, 2022

@swift-ci please smoke test

@tomerd tomerd self-assigned this Mar 3, 2022
@tomerd tomerd merged commit 2d04d7e into swiftlang:main Mar 3, 2022
tomerd added a commit to tomerd/swift-package-manager that referenced this pull request Apr 12, 2022
motivation: fix an issue when not all options are presented as expected, and make the code clearer to reason about

changes:
* rename SwiftToolOptions to GlobalOptions
* refactor SwiftToolOptions (GlobalOptions) to multiple groups per domains: locations, caching, logging, build, linker, etc
* set GlobalOptions "hiddenFromHelp" flag to false for swift-build, swift-test and swift-package
* move enableCodeCoverage from GlobalOptions to TestToolOptions, since they apply there
* refactor code that construct test build to pass in more fine grained options rather than take the entire global options model
* adjust call sites and test

rdar://82658867
tomerd added a commit to tomerd/swift-package-manager that referenced this pull request Apr 12, 2022
motivation: fix an issue when not all options are presented as expected, and make the code clearer to reason about

changes:
* rename SwiftToolOptions to GlobalOptions
* refactor SwiftToolOptions (GlobalOptions) to multiple groups per domains: locations, caching, logging, build, linker, etc
* set GlobalOptions "hiddenFromHelp" flag to false for swift-build, swift-test and swift-package
* move enableCodeCoverage from GlobalOptions to TestToolOptions, since they apply there
* refactor code that construct test build to pass in more fine grained options rather than take the entire global options model
* adjust call sites and test

rdar://82658867
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants