@@ -37,9 +37,16 @@ def parse(component, compile_key):
37
37
the compartments needed
38
38
39
39
"""
40
- (pure_fn , output_compartments ), (
41
- args , parameters , compartments , parse_varnames ) = \
42
- get_resolver (component .__class__ , compile_key )
40
+ if component .__class__ .__dict__ .get ("auto_resolve" , True ):
41
+ (pure_fn , output_compartments ), (
42
+ args , parameters , compartments , parse_varnames ) = \
43
+ get_resolver (component .__class__ , compile_key )
44
+ else :
45
+ build_method = component .__class__ .__dict__ .get (f"build_{ compile_key } " , None )
46
+ if build_method is None :
47
+ critical (f"Component { component .name } if flagged to not use resolvers but "
48
+ f"does not have a build_{ compile_key } method" )
49
+ return build_method (component )
43
50
44
51
if parse_varnames :
45
52
args = []
@@ -95,11 +102,13 @@ def compile(component, resolver):
95
102
96
103
funParams = {narg : component .__dict__ [narg ] for narg in params }
97
104
105
+ comp_key_key = [(narg .split ('/' )[- 1 ], narg ) for narg in comp_ids ]
106
+
98
107
def compiled (** kwargs ):
99
108
funArgs = {narg : kwargs .get (narg ) for narg in _args }
100
- funComps = {narg . split ( '/' )[ - 1 ] : kwargs .get (narg ) for narg in comp_ids }
109
+ funComps = {knarg : kwargs .get (narg ) for knarg , narg in comp_key_key }
101
110
102
111
return pure_fn .__func__ (** funParams , ** funArgs , ** funComps )
103
112
104
- exc_order .append ((compiled , out_ids , component .name ))
113
+ exc_order .append ((compiled , out_ids , component .name , comp_ids ))
105
114
return exc_order
0 commit comments