Skip to content
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

Merged

Conversation

franramirez688
Copy link
Contributor

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

@franramirez688 franramirez688 added this to the 2.0.0-beta8 milestone Dec 28, 2022
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():
Copy link
Contributor Author

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.

@franramirez688 franramirez688 marked this pull request as ready for review December 28, 2022 15:57
@@ -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
Copy link
Member

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
Copy link
Member

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()
Copy link
Member

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?

@memsharded memsharded merged commit 5d08795 into conan-io:develop2 Dec 29, 2022
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.

3 participants