From 6ec06b65f1f32f5709a949ba13ab8e161d924ae3 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