From 43859d6985a9a1c3d3b12f486fbf0f4c562072bb Mon Sep 17 00:00:00 2001 From: Furior Date: Thu, 13 Jul 2023 02:16:24 +0700 Subject: [PATCH 1/4] Fix: tickled files for modularity --- paradise.dme | 4 +++- tools/ci/unticked_files.py | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/paradise.dme b/paradise.dme index 5e304d0672c1..13db32e1ab40 100644 --- a/paradise.dme +++ b/paradise.dme @@ -2671,5 +2671,7 @@ #include "goon\code\datums\browserOutput.dm" #include "interface\interface.dm" #include "interface\skin.dmf" -#include "modular_ss220\modular_ss220.dme" // SS220 // END_INCLUDE + +// SS220 +#include "modular_ss220\modular_ss220.dme" diff --git a/tools/ci/unticked_files.py b/tools/ci/unticked_files.py index 30e290f81418..71d3560a9faf 100644 --- a/tools/ci/unticked_files.py +++ b/tools/ci/unticked_files.py @@ -27,6 +27,8 @@ IGNORE_FILES = { # Included directly in the function /datum/tgs_api/v5#ApiVersion 'code/modules/tgs/v5/v5_interop_version.dm' + 'modular_ss220/example/code/example.dm' + 'modular_ss220/example/_example.dm' } def get_unticked_files(root:Path): @@ -35,8 +37,10 @@ def get_unticked_files(root:Path): with open(root / includer, 'r') as f: lines = [line for line in f.readlines() if line.startswith('#include')] included = [line.replace('#include ', '').rstrip('\r\n').strip('"') for line in lines] - print(f'Found {len(included)} includes in {root / includer}') + nested_dmes = [file for file in included if ".dme" in file] + print(f'Found {len(included)} includes and {len(nested_dmes)} nested .dme\'s in {root / includer}') ticked_files.update([root / Path(includer).parent / Path(PureWindowsPath(i)) for i in included]) + INCLUDER_FILES.extend([file.replace("\\\\", "/") for file in nested_dmes]) all_dm_files = {f for f in root.glob('**/*.dm')} return all_dm_files - ticked_files - {root / f for f in IGNORE_FILES} From cc69ef1fb3c0555638fb50dca0b9a4413fe962b2 Mon Sep 17 00:00:00 2001 From: Furior Date: Thu, 13 Jul 2023 02:25:26 +0700 Subject: [PATCH 2/4] debug commit --- tools/ci/unticked_files.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci/unticked_files.py b/tools/ci/unticked_files.py index 71d3560a9faf..e3829f02ea46 100644 --- a/tools/ci/unticked_files.py +++ b/tools/ci/unticked_files.py @@ -40,6 +40,7 @@ def get_unticked_files(root:Path): nested_dmes = [file for file in included if ".dme" in file] print(f'Found {len(included)} includes and {len(nested_dmes)} nested .dme\'s in {root / includer}') ticked_files.update([root / Path(includer).parent / Path(PureWindowsPath(i)) for i in included]) + print(f"DEBUG {nested_dmes}") INCLUDER_FILES.extend([file.replace("\\\\", "/") for file in nested_dmes]) all_dm_files = {f for f in root.glob('**/*.dm')} From 714472394108e53c6c168d6f08f74faf4b5f9d35 Mon Sep 17 00:00:00 2001 From: Furior Date: Thu, 13 Jul 2023 02:27:52 +0700 Subject: [PATCH 3/4] debug commit 2 --- tools/ci/unticked_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/unticked_files.py b/tools/ci/unticked_files.py index e3829f02ea46..775d29b16423 100644 --- a/tools/ci/unticked_files.py +++ b/tools/ci/unticked_files.py @@ -41,7 +41,7 @@ def get_unticked_files(root:Path): print(f'Found {len(included)} includes and {len(nested_dmes)} nested .dme\'s in {root / includer}') ticked_files.update([root / Path(includer).parent / Path(PureWindowsPath(i)) for i in included]) print(f"DEBUG {nested_dmes}") - INCLUDER_FILES.extend([file.replace("\\\\", "/") for file in nested_dmes]) + INCLUDER_FILES.extend([file.replace("\\", "/") for file in nested_dmes]) all_dm_files = {f for f in root.glob('**/*.dm')} return all_dm_files - ticked_files - {root / f for f in IGNORE_FILES} From bfecc8bcee9ff84c143388598a96d1090457e0b3 Mon Sep 17 00:00:00 2001 From: Furior Date: Thu, 13 Jul 2023 05:58:29 +0700 Subject: [PATCH 4/4] Fixed? --- tools/ci/unticked_files.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/ci/unticked_files.py b/tools/ci/unticked_files.py index 775d29b16423..351dfbeadd58 100644 --- a/tools/ci/unticked_files.py +++ b/tools/ci/unticked_files.py @@ -26,8 +26,9 @@ IGNORE_FILES = { # Included directly in the function /datum/tgs_api/v5#ApiVersion - 'code/modules/tgs/v5/v5_interop_version.dm' - 'modular_ss220/example/code/example.dm' + 'code/modules/tgs/v5/v5_interop_version.dm', + # Example files. They should not be included in the build + 'modular_ss220/example/code/example.dm', 'modular_ss220/example/_example.dm' } @@ -40,7 +41,7 @@ def get_unticked_files(root:Path): nested_dmes = [file for file in included if ".dme" in file] print(f'Found {len(included)} includes and {len(nested_dmes)} nested .dme\'s in {root / includer}') ticked_files.update([root / Path(includer).parent / Path(PureWindowsPath(i)) for i in included]) - print(f"DEBUG {nested_dmes}") + if nested_dmes: print(f"Additional include files: {nested_dmes}") INCLUDER_FILES.extend([file.replace("\\", "/") for file in nested_dmes]) all_dm_files = {f for f in root.glob('**/*.dm')}