-
Notifications
You must be signed in to change notification settings - Fork 993
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
[dev2][conan list] Enhancements 2.0 #12801
[dev2][conan list] Enhancements 2.0 #12801
Conversation
cli_out_write(f"{indentation * 4}Empty package information", | ||
for ref_name, refs in info_per_ref_name.items(): | ||
cli_out_write(f"{indentation}{ref_name}", fg=recipe_name_color) | ||
for ref, prefs in refs.items(): |
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.
From here to below, there are no changes at all. It's only the indentation diff.
@@ -114,7 +114,7 @@ def list(conan_api: ConanAPI, parser, *args): | |||
results[name] = {"error": str(e)} | |||
else: | |||
results[name] = list_bundle.serialize() if args.format in ("json", "html") \ | |||
else list_bundle.recipes | |||
else list_bundle.ordered_recipes_by_name |
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 think it is better to leave the list_bundle.recipes
and have that method/property to return the references ordered?
output = str(self.client.out) | ||
expected_output = textwrap.dedent("""\ | ||
Local Cache: | ||
test_recipe |
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.
Were you ordering recipes by name? pkg
should be before test_recipe
?
self.recipes.setdefault(pref.ref, []).append((pref, binary_info)) | ||
|
||
@property | ||
def ordered_recipes_by_name(self): | ||
ret = OrderedDict() |
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 not a SortedDict
, the OrderedDict
is ordered by insertion order, so I think this is not really sorting anything?
Changelog: Bugfix: Ordering if same ref.name but different versions.
Changelog: Feature: Avoid requesting package configuration if PkgID is passed.
Docs: omit
Related to #12798