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
Feature/package revision in json info #7890
Feature/package revision in json info #7890
Conversation
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.
Looking good, thanks for your contribution.
Please check the review, and try to add a check in the existing InfoTest.test_json_info_outputs() (conans/test/functional/command/info/info_test.py)
@@ -177,8 +179,8 @@ def _add_if_exists(attrib, as_list=False): | |||
if isinstance(ref, ConanFileReference): | |||
item_data["recipe"] = node.recipe | |||
|
|||
if get_env("CONAN_CLIENT_REVISIONS_ENABLED", False) and node.ref.revision: |
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.
I am reviewing this, seems unused now.
@@ -106,6 +106,7 @@ def _print(it_field, show_field=None, name=None, color=Color.BRIGHT_GREEN): | |||
_print("recipe", name="Recipe", color=None) | |||
if show_revisions: | |||
_print("revision", name="Revision", color=None) | |||
_print("package_revision", name="Package revision", color=None) |
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.
Printing the package revision to screen too
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.
For the assertNotIn
I did is the test not worth it ?
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.
The problem is that it was asserting that the revisions are not defined, the opposite of what we want. We want the revisions to be part of the information. That test now checks for self.assertEqual()
to check that it is both there and has a value, instead of checking that it is not defined.
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.
Hi @sdmg15
I think this is ready for another review, and we can take it out of draft. Assigning it tentatively for next Conan 1.31 release
Changelog: Feature: Including package revision information in output from
conan info
(when revisions are enabled).Docs: Omit
closes [feature] 'conan info' to return the package revision #7796
develop
branch, documenting this one.Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.