From 9e742988ee3297497aa208f96d7ca5051a4e1ef5 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sun, 30 Jul 2023 16:02:33 +0200 Subject: [PATCH] Sort objects before output to ensure reproducible build results See https://reproducible-builds.org/ for why this is good. This patch was done while working on reproducible builds for openSUSE. --- telethon_generator/generators/tlobject.py | 1 + 1 file changed, 1 insertion(+) diff --git a/telethon_generator/generators/tlobject.py b/telethon_generator/generators/tlobject.py index 535ff38d..04fc3d61 100644 --- a/telethon_generator/generators/tlobject.py +++ b/telethon_generator/generators/tlobject.py @@ -667,6 +667,7 @@ def _write_all_tlobjects(tlobjects, layer, builder): builder.current_indent += 1 # Fill the dictionary (0x1a2b3c4f: tl.full.type.path.Class) + tlobjects.sort(key=lambda x: x.name) for tlobject in tlobjects: builder.write('{:#010x}: ', tlobject.id) builder.write('functions' if tlobject.is_function else 'types')