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
Currently there is no way to tell exactly what tasks/hooks will get executed when a particular task is invoked, especially when another package is providing some of those tasks for you. The bootleg mix tasks would support a --dry-run flag, which would cause bootleg to load and parse its config files like normal, and then "run" the tasks with remote turned into a no-op (or maybe patch into SSHKit's dry run functionality). During the run, it would print out each task/hook as they are entered/exited.
The flexibility of the DSL is a bit of a disadvantage here, as things like invoke can be conditionalised on the results of a remote call. Doing AST traversal, it should be possible to detect those cases and maybe the output would reflect both branches? Or warn that the results are unknown (we don't want to follow too many conditional branches if the user has a bunch of conditional invokes).
This feature is probably going to need to rely on AST parsing instead of actual code execution to avoid side-effects like notifying APMs or touching files via system calls.
It sounds like it may be simpler to avoid walking the AST (or doing so in a later task) and initially just going through the list of tasks registered to run. It could be left to the user to examine those tasks for calls to invoke.
Currently there is no way to tell exactly what tasks/hooks will get executed when a particular task is invoked, especially when another package is providing some of those tasks for you. The bootleg mix tasks would support a
--dry-run
flag, which would cause bootleg to load and parse its config files like normal, and then "run" the tasks withremote
turned into a no-op (or maybe patch into SSHKit's dry run functionality). During the run, it would print out each task/hook as they are entered/exited.The flexibility of the DSL is a bit of a disadvantage here, as things like
invoke
can be conditionalised on the results of aremote
call. Doing AST traversal, it should be possible to detect those cases and maybe the output would reflect both branches? Or warn that the results are unknown (we don't want to follow too many conditional branches if the user has a bunch of conditionalinvoke
s).This feature is probably going to need to rely on AST parsing instead of actual code execution to avoid side-effects like notifying APMs or touching files via system calls.
Example output:
The text was updated successfully, but these errors were encountered: