Skip to content

Commit 7d48da4

Browse files
committed
Get mods lists in length order
This means that more mods will be tested sooner, exposing errors faster.
1 parent 8eccbd5 commit 7d48da4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build-scripts/get_all_mods.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import os
1111

1212
mods_this_time = []
13+
mods_lists = []
1314

1415
exclusions = [
1516
# Tuple of (mod_id, mod_id) - these two mods will be incompatible
@@ -49,7 +50,7 @@ def add_mods(mods):
4950

5051

5152
def print_modlist(modlist, master_list):
52-
print(','.join(modlist))
53+
mods_lists.append(','.join(modlist))
5354
master_list -= set(modlist)
5455
modlist.clear()
5556

@@ -92,7 +93,7 @@ def print_modlist(modlist, master_list):
9293
if ident in obsolete_mods:
9394
continue
9495
mods_this_time.append(os.path.basename(mod.path))
95-
print(','.join(mods_this_time))
96+
mods_lists.append(','.join(mods_this_time))
9697
mods_this_time.clear()
9798

9899
mods_remaining = set(all_mod_dependencies)
@@ -107,3 +108,6 @@ def print_modlist(modlist, master_list):
107108
raise RuntimeError(
108109
'mods remain ({}) but none could be added'.format(mods_remaining))
109110
print_modlist(mods_this_time, mods_remaining)
111+
112+
for list in sorted(mods_lists, key=len, reverse=True):
113+
print(list)

0 commit comments

Comments
 (0)