It’s not uncommon in a workflow to define a function in one step, and want to use it in another.
You can write functions to state and reuse them that way, but it always feels like a bit of a hacky solution. Sometimes this causes problems in serialization (I don’t think that’s a problem in-between steps though)
It would be nice to have a first-class way of defining a function and making it reusable to the whole workflow. Maybe it uses a common adaptor function like declare
, or maybe just all function do_the_thing(){}
statements at the top level are automatically made available to all jobs.
This would likely help us to create unit tests for functions with the CLI