-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Show traits package subcommand #9213
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
base: main
Are you sure you want to change the base?
Conversation
…their descriptions
@swift-ci please test |
@swift-ci please test |
@swift-ci please test |
@swifti-ci test Windows |
@swift-ci test Windows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we also add some tests for this command? :) otherwise LGTM!
@@ -0,0 +1,303 @@ | |||
# swift package show-traits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: thank you for adding the docs for this command! :D
Co-authored-by: Bri Peticca <[email protected]>
I was thinking about the testing of this. My feeling is that either this would be yet another E2E test, which we have far too many, or it's just testing the package graph API's that it calls, which I think is already covered. |
@swift-ci please test |
@swift-ci test Windows |
@swift-ci test macOS |
1 similar comment
@swift-ci test macOS |
@swift-ci test Linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great sub-command. It would be ideal is we can write some tests lower in the pyramid. Maybe tests that:
- ensure the JSON generation returns the expected value
- ensure the text/flatlist generation returns the expected output
- The correct "traits" option is returned given the
--package-id
argument is set or not - 1 end-to-end test that ensure the overall workflow works as expected.
@swift-ci please test |
@swift-ci test Windows |
1 similar comment
@swift-ci test Windows |
One of the benefits of traits comes from their declarative nature with a
description that helps to explain their purpose. Users should be able to
discover, and understand them so that they can enable them for the
current package, and also dependencies too so that they can enable them
through the package dependencies.
Add a new show-traits package subcommand that defaults to listing
the traits for the current package, and optionally for other packages
with an option.
Add a format option to set either a text, or JSON output format.