Ben Keil
04/18/2023, 3:27 PMJobBuilder.run()
. it’s a little bit annoying to implement new fields twice.
the only difference is that the one function has an optional name parameter and the other one not.
if we would just remove the function without the param, it would collide with kotlin’s native run
method. one solution would be to switch the order of the params.
from
public fun run(
name: String? = null,
command: String,
to
public fun run(
command: String,
name: String? = null,
but it will break some implementations (you see it probably first when the pipeline runs)
beside that, would it be a good idea to force people to use named parameter, like we do in actions? this would make extensions in the future also easier.Piotr Krzemiński
04/18/2023, 6:50 PMNikky
04/18/2023, 7:54 PMPiotr Krzemiński
04/18/2023, 7:56 PMpeople could still call it by order of arguments without specifying names..
What do you mean? There's a way to enforce using only named arguments