From c54c40053e184614457529d63c0e66cede701793 Mon Sep 17 00:00:00 2001 From: anothersimulacrum Date: Wed, 12 Jun 2024 03:48:44 +0000 Subject: [PATCH 1/2] get_all_mods: Don't add mod if dependency incompat Return false if a mod to be added is incompatible, instead of just continuing and not adding dependencies. --- build-scripts/get_all_mods.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/build-scripts/get_all_mods.py b/build-scripts/get_all_mods.py index 64f361cf0cc3b..bf87123673545 100755 --- a/build-scripts/get_all_mods.py +++ b/build-scripts/get_all_mods.py @@ -23,11 +23,14 @@ def add_mods(mods): # Either an invalid mod id, or blacklisted. return False for mod in mods: - if mod not in mods_this_time and compatible_with(mod, mods_this_time): - if add_mods(all_mod_dependencies[mod]): - mods_this_time.append(mod) - else: - return False + if mod in mods_this_time: + continue + if not compatible_with(mod, mods_this_time): + return False + if add_mods(all_mod_dependencies[mod]): + mods_this_time.append(mod) + else: + return False return True From f19d9090e6a2f7cb6ebed282bb941042d14f20ff Mon Sep 17 00:00:00 2001 From: anothersimulacrum Date: Wed, 12 Jun 2024 03:24:39 +0000 Subject: [PATCH 2/2] Allow mod exclusions in get_all_mods.py The purpose of get_all_mods.py is to test individual mods for errors, instead of checking inter-mod compatibility. As such, it shouldn't need to start triggering errors because of a between-mod compatibility error that is tracked. A band-aid fix for the CI flakiness that 74443 causes. Should be removed when that is fixed. --- build-scripts/get_all_mods.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build-scripts/get_all_mods.py b/build-scripts/get_all_mods.py index bf87123673545..1bd473299f718 100755 --- a/build-scripts/get_all_mods.py +++ b/build-scripts/get_all_mods.py @@ -10,10 +10,20 @@ mods_this_time = [] +exclusions = [ + # #74443 - incompatibility between mindovermatter and aftershock due to bug + ('mindovermatter', 'aftershock') +] + def compatible_with(mod, existing_mods): if mod in total_conversions and total_conversions & set(existing_mods): return False + for entry in exclusions: + if entry[0] == mod and entry[1] in existing_mods: + return False + if entry[1] == mod and entry[0] in existing_mods: + return False return True