From bf5f384fab6ab61f85b1f3872efbe12f6796ef51 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 16 Jul 2018 03:12:50 +0000 Subject: [PATCH] Resolve included files only once Remove an unnecessary additional round of included file resolution and rely on the one which happens once the parent file has been completely loaded. This was causing a startup race which would sometimes result in the configured search path to not get applied depending on initial config file load order, because it would prematurely attempt to resolve included files before the configured search path was loaded. --- mudpy/data.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/mudpy/data.py b/mudpy/data.py index 6371045..be88d65 100644 --- a/mudpy/data.py +++ b/mudpy/data.py @@ -74,13 +74,7 @@ class Data: includes = [] for node in list(self.data): if node == "_load": - for included in self.data["_load"]: - included = find_file( - included, - relative=self.source, - universe=self.universe) - if included not in includes: - includes.append(included) + includes += self.data["_load"] continue if node.startswith("_"): continue -- 2.11.0