task icon indicating copy to clipboard operation
task copied to clipboard

Add Option to Hide "is up to date"

Open ProfessorManhattan opened this issue 4 years ago • 2 comments

For every task, I list the dependencies like this:

my-task:
  deps:
    - :npm:prettier
    - :software:jq
    - :software:yq

With the new run: once option it is working absolutely fantastic (thank you Task developers). However, since I include the deps on each task, I get a lot of spam from "is up to date" and the information is not that useful. Is there a way of silencing the tasks without silencing any of the other logs?

ProfessorManhattan avatar Aug 08 '21 07:08 ProfessorManhattan

this could be a UI feature of V4. Making the UI less static/append-only could really improve things.

Though, @ProfessorManhattan are you interested in seeing/parsing the result? or just the spam of watching things run? Because I was also thinking of a "reporting" framework, so you could get the output of a task run in a machine readable format, like JSON.

image

ghostsquad avatar Apr 29 '22 05:04 ghostsquad

To be honest I am not sure if we need a option to hide it. Instead we can only display it when verbosity level is increased via -v. For normal execution, I do not see much value in it, so if we ensure we display it only when we have extra verbosity, we sort the problem.

ssbarnea avatar Jun 09 '22 13:06 ssbarnea

Would it make sense to use the existing silent mode flag?

I ran in to this when I needed a task to only output the value i explicitly echo'ed as I needed another process to use the output. And setting silent: true worked great - except for any tasks that used a status.

So, for my need it would be perfect if silent: true also silenced status checks.

danquah avatar Apr 04 '23 12:04 danquah

@danquah I think that's a good idea, indeed. I would be happy to accept a PR for that.

andreynering avatar Apr 04 '23 14:04 andreynering

A better option would be use of stderr for operator only messaging, and stdout for machine messaging

ghostsquad avatar Apr 05 '23 01:04 ghostsquad

@ghostsquad as far as I can tell we already log to stderr in this case. I guess I could have solved my particular issue by just directing stderr away. I do really like to have the option of turning the verbosity down via the silent flag - and now that it's already there, it feels like something the Status feature should respect.

danquah avatar Apr 05 '23 04:04 danquah

@ghostsquad as far as I can tell we already log to stderr in this case. I guess I could have solved my particular issue by just directing stderr away. I do really like to have the option of turning the verbosity down via the silent flag - and now that it's already there, it feels like something the Status feature should respect.

I agree, options are usually beneficial. Though they can also produce a lot of sprawl in the code base.

ghostsquad avatar Apr 05 '23 06:04 ghostsquad

Though they can also produce a lot of sprawl in the code base.

100%

In this case it my main gripe is that the use of silent is inconsistent. If I set it via --silent or at the taskfile level the message is silenced - but if I specify it on a task level, nothing happens.

danquah avatar Apr 05 '23 06:04 danquah