Pass per-target options as invoke args
edvardm opened this issue · comments
Edvard Majakari commented
If we have a rule like
foo: opts ?= --fast -W
foo:
build $(opts)
we could try parsing those opts and pass to invoke with some assumptions like this:
@task
def foo(c, fast: bool = True, W: bool = True):
c.run("build")
Not sure if this is the way to go though, as the two formats are not isomorphic; using example above, Make would treat opts just as an unstructured string allowing use of positional args, which invoke doesn't have