1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-12 04:41:26 +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:
Anna Antonenko
2025-04-07 16:45:09 +04:00
committed by GitHub
parent eb0f5ef8c0
commit 3d02063bce
14 changed files with 28 additions and 16 deletions

View File

@@ -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"),