@@ -251,6 +251,23 @@ def _drop_flows(flows: Iterable[flow.Flow], app_ref: str, force: bool = False) -
251251 setup_bundle .apply (report_to_stdout = True )
252252
253253
254+ def _deprecate_setup_flag (
255+ ctx : click .Context , param : click .Parameter , value : bool
256+ ) -> bool :
257+ """Callback to warn users that --setup flag is deprecated."""
258+ # Check if the parameter was explicitly provided by the user
259+ if param .name is not None :
260+ param_source = ctx .get_parameter_source (param .name )
261+ if param_source == click .core .ParameterSource .COMMANDLINE :
262+ click .secho (
263+ "Warning: The --setup flag is deprecated and will be removed in a future version. "
264+ "Setup is now always enabled by default." ,
265+ fg = "yellow" ,
266+ err = True ,
267+ )
268+ return value
269+
270+
254271def _setup_flows (
255272 flow_iter : Iterable [flow .Flow ],
256273 * ,
@@ -392,8 +409,9 @@ def drop(app_target: str | None, flow_name: tuple[str, ...], force: bool) -> Non
392409 "--setup" ,
393410 is_flag = True ,
394411 show_default = True ,
395- default = False ,
396- help = "Automatically setup backends for the flow if it's not setup yet." ,
412+ default = True ,
413+ callback = _deprecate_setup_flag ,
414+ help = "(DEPRECATED) Automatically setup backends for the flow if it's not setup yet. This is now the default behavior." ,
397415)
398416@click .option (
399417 "--reset" ,
@@ -553,8 +571,9 @@ def evaluate(
553571 "--setup" ,
554572 is_flag = True ,
555573 show_default = True ,
556- default = False ,
557- help = "Automatically setup backends for the flow if it's not setup yet." ,
574+ default = True ,
575+ callback = _deprecate_setup_flag ,
576+ help = "(DEPRECATED) Automatically setup backends for the flow if it's not setup yet. This is now the default behavior." ,
558577)
559578@click .option (
560579 "--reset" ,
0 commit comments