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

-s param doesn´t accept multiple arguments since 0.34.0 #446

Open
wassupxP opened this issue Dec 15, 2022 · 1 comment
Open

-s param doesn´t accept multiple arguments since 0.34.0 #446

wassupxP opened this issue Dec 15, 2022 · 1 comment

Comments

@wassupxP
Copy link

wassupxP commented Dec 15, 2022

After bump I found out that -s param doesn´t accept multiple tasks as arguments. Not sure whether this was intentional, because it is not included in changelog so just to make sure I am creating this bug report.

My main use case is that when I run group task (task with no actions) I substitute all tasks that are a direct dependency of group task and run them with -s switch (so it actually runs all direct dependencies instead of doing nothing - group task has no actions on its own) in task_loader. Right now this use case is broken, because only first task is run.

Please let me know if you need more informations or if I just misunderstood --single param.

Fund with Polar
@wassupxP
Copy link
Author

wassupxP commented Jan 16, 2023

Hello, another bit nasty dodo file, but the issue should be easily reproducable. tried locally on doit 0.35.0


import os

def task_one():
    curr_file = os.path.dirname(os.path.abspath(__file__))
    def action():
        with open(os.path.join(curr_file, "file.txt"), "w+") as f:
            f.write("MOCK")

    return {'actions': [(action,)],
            'uptodate': [os.path.isfile(os.path.join(curr_file, "file.txt"))],
            'basename': 'one',
            }

def task_two():
    curr_file = os.path.dirname(os.path.abspath(__file__))
    def action():
        with open(os.path.join(curr_file, "file2.txt"), "w+") as f:
            f.write("MOCK")

    return {'actions': [(action,)],
            'uptodate': [os.path.isfile(os.path.join(curr_file, "file2.txt"))],
            'basename': 'two',
            }

Including log from console as well:

$ python.exe -m doit -s one two
.  one
$ python.exe -m doit info one

one

status     : up-to-date

$ python.exe -m doit info two

two

status     : run
 * The following uptodate objects evaluate to false:
    - False (args=None, kwargs=None)


Please let me know if you would need additional informations.

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

No branches or pull requests

2 participants