From: Jeremy Stanley Date: Mon, 16 Jul 2018 03:12:50 +0000 (+0000) Subject: Resolve included files only once X-Git-Tag: 0.0.1~67 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=bf5f384fab6ab61f85b1f3872efbe12f6796ef51 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. --- 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