You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This just fixes the issue where substituting_steps would be applied to
all flows, disallowing the use of flows like OpenInKLayout or
OpenInOpenROAD.
The breaking strict class-level substitution AND the re-numbering will
both remain in 3.0.0.
# to maintain backwards compat, in 3 you will need to explicitly
85
+
# set the flow you're substituting
86
+
target_flow_desc=meta.flowor"Classic"
87
+
88
+
ifisinstance(target_flow_desc, str):
89
+
iffound:=Flow.factory.get(target_flow_desc):
90
+
TargetFlow=found
91
+
else:
92
+
err(
93
+
f"Unknown flow '{meta.flow}' specified in configuration file's 'meta' object."
94
+
)
95
+
ctx.exit(1)
96
+
elifisinstance(target_flow_desc, list):
97
+
TargetFlow=SequentialFlow.make(target_flow_desc)
98
+
ifmeta.substituting_stepsisnotNoneandissubclass(
99
+
TargetFlow, SequentialFlow
100
+
):
101
+
ifmeta.flowisNone:
102
+
warn(
103
+
'config_file currently has substituting_steps set with no flow, where it will fall back to Classic. Starting OpenLane 3.0.0, this will be an error. Please update your configuration to explicitly set "flow" to "Classic".'
104
+
)
105
+
TargetFlow=TargetFlow.Substitute(meta.substituting_steps) # type: ignore # Type checker is being rowdy with this one
89
106
90
107
ifflow_nameisnotNone:
91
-
flow_description=flow_name
92
-
93
-
ifflow_descriptionisNone:
94
-
flow_description="Classic"
108
+
iffound:=Flow.factory.get(flow_name):
109
+
TargetFlow=found
110
+
else:
111
+
err(f"Unknown flow '{flow_name}' passed to initialization function.")
112
+
ctx.exit(1)
95
113
96
114
iflen(initial_state_element_override):
97
115
ifwith_initial_stateisNone:
@@ -114,18 +132,9 @@ def run(
114
132
overrides=overrides,
115
133
)
116
134
117
-
TargetFlow: Type[Flow]
118
-
119
-
ifisinstance(flow_description, str):
120
-
ifFlowClass:=Flow.factory.get(flow_description):
121
-
TargetFlow=FlowClass
122
-
else:
123
-
err(
124
-
f"Unknown flow '{flow_description}' specified in configuration file's 'meta' object."
125
-
)
126
-
ctx.exit(1)
127
-
else:
128
-
TargetFlow=SequentialFlow.make(flow_description)
135
+
assert (
136
+
TargetFlowisnotNone
137
+
), "TargetFlow is unexpectedly None. Please report this as a bug."
0 commit comments