Skip to content

Sort values in log under get_recipe_order_and_bootstrap and get_recipe_order_and_bootstrap functions. #2930

Open
@UriyaHarpeness

Description

@UriyaHarpeness

This is a matter of preference.

When running consecutive builds, I myself prefer the output to be as similar as possible, thriving for 100% match - this becomes more useful when looking for difference from a former build, and reducing the "noise".
Python sets are a very common pitfall for this, as the order is not guaranteed, so for running the same build twice you would get the log Will compile for the following archs: arm64-v8a, armeabi-v7a and right after it Will compile for the following archs: armeabi-v7a, arm64-v8a.
Same "issue" with the log Dist will also contain modules (pillow~=10.1, kivymd~=1.1, kivy~=2.2) installed from pip vs Dist will also contain modules (kivy~=2.2, pillow~=10.1, kivymd~=1.1) installed from pip.

The fix is as easy as swapping the list to sorted, would gladly open the PR myself, but first would like to get some feedback as for whether it matters to anyone besides me, or this issue is a nuisance.

Side note: There can be more places with the same "issue", if this issue is accepted, possibly more PRs would follow.

def set_archs(self, arch_names):
all_archs = self.archs
new_archs = set()
for name in arch_names:
matching = [arch for arch in all_archs if arch.arch == name]
for match in matching:
new_archs.add(match)
self.archs = list(new_archs)
if not self.archs:
raise BuildInterruptingException('Asked to compile for no Archs, so failing.')
info('Will compile for the following archs: {}'.format(
', '.join(arch.arch for arch in self.archs)))

python_modules = list(set(python_modules))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions