Root namespace default tasks ignored #165

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

Projects

None yet

1 participant

@bitprophet
Member

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
Member

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.

@bitprophet bitprophet added a commit that referenced this issue Aug 27, 2014
@bitprophet bitprophet Changelog re #165 9fa31cf
@bitprophet bitprophet added a commit that referenced this issue Aug 27, 2014
@bitprophet bitprophet Failing test re #165 32c9742
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment