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

Logging when a task is skipped (caused by mismatch condition) #326

Closed
davidB opened this issue Nov 30, 2019 · 4 comments
Closed

Logging when a task is skipped (caused by mismatch condition) #326

davidB opened this issue Nov 30, 2019 · 4 comments
Assignees
Milestone

Comments

@davidB
Copy link

davidB commented Nov 30, 2019

Features Description
When analyzing output of a run it would be useful to have feedback about Task not executed because condition of the task is not ok.

Describe the solution you'd like

  • The minimal solution would be display for "skipped" task "Skipped" instead of "Running"
[cargo-make] INFO - Running Task: xxxx

become

[cargo-make] INFO - Skipping Task: xxxx
OR
[cargo-make] INFO - Running Task: xxxx [Skip]
  • Other alternative: allow to provide a message to display when condition is ko
condition = { ... else_msg = "the task is skipped X = ${X}" }
[cargo-make] INFO - Running Task: xxxx
[cargo-make] INFO - Task: xxxx - the task is skipped X = ...
  • A better solution could be to have the cause, (like "variable XXXX undefined")

Having an intermediary log level (DEBUG is too verbose) or a flag to enable this display is also possible.

@sagiegurari
Copy link
Owner

Changing the output from 'running' to 'skipping' sounds good to me.
I am not sure about the message inside the condition as there is also condition_script that can filter out tasks.

@sagiegurari
Copy link
Owner

@davidB running/skipped printout is now implemented in 0.24.1 development branch.

@davidB
Copy link
Author

davidB commented Dec 1, 2019

About the message inside the condition, it could be move out (at same level than condition and condition_script) by example named skip_message.
I never try condition_script, if there is an echo into the script called by condition_script does it is displayed ? if yes, I guess else_message(or skip_message) could be only an optional field of condition.
having more info (to debug) is something than need more reflexion, because it is something that can be useful in some condition (to know why an task is not skip) and sometimes it's the opposite (to hide some behavior).

Thanks for the quick fix.

@sagiegurari
Copy link
Owner

This is now officially release so i'm closing this issue.
I'll create another issue and link to this one regarding the skip message.
i'm not 100% sure how useful it is if its static, but will get to it...

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