Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass per-target options as invoke args #20

Open
edvardm opened this issue Oct 5, 2022 · 0 comments
Open

Pass per-target options as invoke args #20

edvardm opened this issue Oct 5, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@edvardm
Copy link
Owner

edvardm commented Oct 5, 2022

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

@edvardm edvardm added the enhancement New feature or request label Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant