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

Root namespace default tasks ignored #165

Closed
bitprophet opened this Issue Aug 8, 2014 · 1 comment

Comments

Projects
None yet
1 participant
@bitprophet
Member

bitprophet commented Aug 8, 2014

In the following setup:

@task(default=True)
def all_the_things():
    # whatever

# this bug is true for implicit and explicit root namespaces - makes no difference

This command should call all_the_things, intuitively:

$ invoke

But it doesn't; nor does it error.

If we have code that does/did do this, figure out why it broke & write regression test.

If not, update things so it does.

@bitprophet bitprophet added the Bug label Aug 25, 2014

@bitprophet bitprophet added this to the 0.8.3 milestone Aug 25, 2014

@bitprophet

This comment has been minimized.

Member

bitprophet commented Aug 27, 2014

Torn between this being the responsibility of the parser ("Got nothing, assume I got the default task's name") and the CLI module ("Got no tasks/contexts back from the parser, let's ask the collection for its default and pretend that was given").

Implementation wise, it's significantly easier to do it at the CLI module; the parser doesn't know or care about default tasks per se - we just use name aliasing and Lexicons for that - but that doesn't map well to "emptiness" because it's all about parsing text tokens.

Whereas the CLI module has ready, clean access to both the parser result and the collection object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment