From 79a955f46bbad158e131a52fac3da175b42aabfe Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sat, 18 Apr 2026 10:09:46 +0200 Subject: [PATCH] Berry faster compilation (#24656) --- CHANGELOG.md | 1 + lib/libesp32/berry/tools/coc/bytes_build.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d6be369..6b896f599 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. - ESP8266 platform update from 2026.03.00 to 2026.04.00 (#24635) - ESP32 Platform from 2025.03.30 to 2026.04.30, Framework (Arduino Core) from v3.1.10 to v3.1.11 and IDF from v5.3.4.251226 to v5.3.4.260127 (#24635) - ESP32-C5/C6/P4 Platform from 2025.03.50 to 2026.04.50, Framework (Arduino Core) from v3.3.7 to v3.3.8 and IDF from v5.5.3+ to v5.5.4.260407 (#24635) +- Berry faster compilation ### Fixed diff --git a/lib/libesp32/berry/tools/coc/bytes_build.py b/lib/libesp32/berry/tools/coc/bytes_build.py index 2fb6d3ed1..3b2f61e7f 100644 --- a/lib/libesp32/berry/tools/coc/bytes_build.py +++ b/lib/libesp32/berry/tools/coc/bytes_build.py @@ -24,7 +24,9 @@ class bytes_build: ostr = "" ostr += "/* binary arrays */\n" ostr += "be_define_const_bytes_empty();\n" - for k in self.map: + # sort to ensure deterministic output so the generated header only + # changes when its content actually changes (avoids spurious rebuilds) + for k in sorted(self.map): ostr += "be_define_const_bytes(" ostr += k + ", " + ", ".join( [ "0x" + k[i:i+2] for i in range(0, len(k), 2)] ) ostr += ");\n" @@ -35,7 +37,7 @@ class bytes_build: ostr = "" ostr += "/* extern binary arrays */\n" ostr += "extern const binstance_arg3 be_const_instance_;\n" - for k in self.map: + for k in sorted(self.map): ostr += "extern const binstance_arg3 be_const_instance_" + k + ";\n" return ostr \ No newline at end of file