cake-build / cake-build/cake

Hide headings for delegating tasks at normal verbosity

Open
#2,344 3 comments 0 reactions 0 assignees View on GitHub
Improvement
Dominant language
C#
Stars
4.2k
Forks
778
Avg merge
1h 15m
Merged PRs (30d)
19

Description

If we consider the following script, that has one task that does something (`Default`) and two delegating tasks that doesn't have any actions:

```cake
Task("Foo");

Task("Bar")
.IsDependentOn("Foo");

Task("Default")
.IsDependentOn("Bar")
.Does(() =>
{
Information("Hello Cake!");
});

RunTarget("Default");
```

If I run this with `normal` verbosity, I get the following output.

```
========================================
Foo
========================================

========================================
Bar
========================================

========================================
Default
========================================
Hello Cake!

Task Duration
--------------------------------------------------
Default 00:00:00.0012661
--------------------------------------------------
Total: 00:00:00.0126071
```

I've actually never thought about this, but why are we showing the headers of delegating tasks when we're explicitly only show delegating tasks with `verbose` verbosity?

**Proposed change:**

I think that we shouldn't show the heading (which does not convey any meaning since they're only delegating) on normal verbosity. The more I think about it, I don't see a good reason to show the headings at all, except perhaps on `diagnostic` verbosity.

We should however consider displaying the delegating tasks in the summary view on `normal` verbosity and hide the headings. The delegating tasks in the summary view would be gray like on `verbose` verbosity.
```
========================================
Default
========================================
Hello Cake!

Task Duration
--------------------------------------------------
Foo 00:00:00.0152253
Bar 00:00:00.0142460
Default 00:00:00.0087549
--------------------------------------------------
Total: 00:00:00.0382262
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the normal-verbosity output for delegating tasks and the summary view described in the issue. Done means delegating task headings are hidden at normal verbosity while those tasks remain in the summary, shown in gray as specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.