kivy / kivy/python-for-android

Sort values in log under `get_recipe_order_and_bootstrap` and `get_recipe_order_and_bootstrap` functions.

Open
#2,930 9 comments 0 reactions 0 assignees View on GitHub
easy feature-request
Dominant language
Python
Stars
8.9k
Forks
2k
Avg merge
12h 20m
Merged PRs (30d)
9

Description

*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 `set`s 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.

https://github.com/kivy/python-for-android/blob/436d5a93282dcfcc7027d19d70963c6773544434/pythonforandroid/build.py#L396-L407
https://github.com/kivy/python-for-android/blob/436d5a93282dcfcc7027d19d70963c6773544434/pythonforandroid/graph.py#L340

Contributor guide

Open the contributing guide

Research direction

Start with the linked sections of pythonforandroid/build.py (lines 396-407) and pythonforandroid/graph.py (line 340), then inspect how the logged architecture and module values are collected. Reproduce consecutive builds and confirm the relevant log entries use stable ordering without changing their contents.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.