mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 20:49:49 +04:00
fbt: Deterministic STARTUP order & additional checks (#4179)
* unit_tests: clear startup order * fam: ensure unique STARTUP order * fbt: warn on same .order values within a group leading to non-determinitic builds * fbt: better formatting for app order warning --------- Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
@@ -150,11 +150,22 @@ def DumpApplicationConfig(target, source, env):
|
||||
print(fg.boldgreen("Firmware modules configuration:"))
|
||||
for apptype in FlipperAppType:
|
||||
app_sublist = env["APPBUILD"].get_apps_of_type(apptype)
|
||||
if app_sublist:
|
||||
# Print a warning if any apps in the list have same .order value
|
||||
unique_order_values = set(app.order for app in app_sublist)
|
||||
if len(app_sublist) != len(unique_order_values) and max(unique_order_values):
|
||||
print(
|
||||
fg.red(f"{apptype.value}: ")
|
||||
+ fg.yellow(
|
||||
"Duplicate .order values in group:\n\t"
|
||||
+ ", ".join(f"{app.appid} ({app.order})" for app in app_sublist)
|
||||
)
|
||||
)
|
||||
elif app_sublist:
|
||||
print(
|
||||
fg.green(f"{apptype.value}:\n\t"),
|
||||
", ".join(app.appid for app in app_sublist),
|
||||
)
|
||||
|
||||
if incompatible_ext_apps := env["APPBUILD"].get_incompatible_ext_apps():
|
||||
print(
|
||||
fg.blue("Incompatible apps (skipped):\n\t"),
|
||||
|
||||
Reference in New Issue
Block a user