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

'uptodate' output is *always* sent to DEVNULL #316

Open
smarie opened this issue Jul 25, 2019 · 5 comments
Open

'uptodate' output is *always* sent to DEVNULL #316

smarie opened this issue Jul 25, 2019 · 5 comments
Labels

Comments

@smarie
Copy link

smarie commented Jul 25, 2019

I just lost a few hours understanding why my tasks were always re-executing despite my 'uptodate' command string being ok (or so I thought).

My command was a multiline command (see #314 ).

It turned out that the error was, as always, a stupid mistake from my side. But I could have debugged it in a FAR shorter time if I had been able to see a few console prints confirming a few assumptions:

  • that my 'uptodate' command was actually executed
  • the contents of my 'uptodate' command
  • and the stdout of my 'uptodate' command (so that I could introduce some debug prints

For example:

> Evaluating if <task_name>:<subtask_name> is up-to-date...
    - Executing command 'echo "hello" & conda activate blah & python -c "cool_code" & echo "ok"'
         hello
         ok
-- <task_name>:<subtask_name>

These messages could be printed 'by default', or in a verbose mode (there does not seem to be any global verbose flag by the way).

Thoughts ?

Fund with Polar
@schettino72
Copy link
Member

I guess it is normal to say that developers need to modify their code (adding print statements or debugger breakpoints) in order to debug their code.

It seems all your problems could be easily done on user-land code.

@smarie
Copy link
Author

smarie commented Jul 27, 2019

I do not agree with your conclusions here: in the current status all standard output is captured (hidden) from 'updtodate' steps. So I can't effectively debug anything, even in a shell script (which is not what I want to do anyway because that would not be portable).

@schettino72 schettino72 reopened this Jul 27, 2019
@schettino72 schettino72 changed the title Debuggable 'uptodate' steps 'uptodate' output is *always* sent to DEVNULL Jul 27, 2019
@schettino72
Copy link
Member

Ok. you are right.
There should be a way to control if output of uptodate commands should be displayed...
Let me think about an interface for that.

@smarie
Copy link
Author

smarie commented Jul 28, 2019

Thanks for considering this. Once you have a better idea of what is the desired api, I can try to help implementing

@arichiardi
Copy link

Ran against this as well, please consider that clean can be a shell command as well and should probably get the same interface.

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

No branches or pull requests

3 participants