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.
This commit is contained in:
Bernhard M. Wiedemann 2023-07-30 16:02:33 +02:00
parent 211238fcd2
commit 9e742988ee

View File

@ -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')