Skip to content

Support more kinds of project 'outputs' in Terminal Logger#12114

Closed
baronfel wants to merge 14 commits intomainfrom
tl-project-outputs
Closed

Support more kinds of project 'outputs' in Terminal Logger#12114
baronfel wants to merge 14 commits intomainfrom
tl-project-outputs

Conversation

@baronfel
Copy link
Copy Markdown
Member

@baronfel baronfel commented Jul 6, 2025

Fixes part of #9608 - specifically showing NuGet packages

Context

This builds on top of #12292.

The primary problem being solved here is detecting and classifying different kinds of project outputs for different ways of building projects - specifically

  • 'normal builds'
  • 'publishing'
  • 'packaging'

Correctly detecting these without introducing a new special kind of message (which would require adoption by the various teams involved in building/packaging/etc.) requires some intimate knowledge of the structures of Targets and Tasks that generate those outputs.

Changes Made

Categorizing ProjectStarted build intent

We now track more data about the project(s) being built:

  • EntryTargets - used to determine the intent of the build
  • (Probably Soon) primary exe/binary names to detect primary assets/exes

To solve the problem of tracking the 'logical outputs' of a project I added the ability to have more than one, and I added an enum to classify each kind of output. We then use this enum to determine

a) what the link in the terminal should point to, and
b) which decorative glyph to use when rendering.

We also support rendering more than one output per TerminalProjectInfo too.

Getting Outputs for relevant Targets and Tasks

There are three kinds of scenario we need to handle to get Target/Task outputs

  • Target runs completely for the current project

This is the easiest case - in this case we get TargetFinishedEventArgs that contain TargetOutputs on them. We can inspect these outputs and pick the ones we need for each comparison. We know the specific Targets we need outputs for, so in the ForwardingLoggers we can remove outputs from all other Targets so that we limit the amount of data we forward back to the central logger. We still need to forward all of the TargetFinishedEventArgs because other rendering cares about tracking this.

  • Target is skipped because everything was up to date

In this case, we need to start looking at TargetStartedEventArgs and capture the contexts for the Targets that we care about.
If we later get a TargetSkippedEventArgs for any of those targets, we can then listen for matching TaskParameterEventArgs with a Kind of SkippedTargetOutputs, forward those to the central node, and the central node can inspect that message's Items in the same way as the 'normal' Target-completion scenario.

  • Target is skipped because it previous ran successfully

In this case, the TargetSkippedEventArgs will say that it previously built successfully, and point to the original BuildEventContext that the results came in on. If we keep the particular kinds of outputs that we need, either on the TerminalProjectInfo structure or on other lookups that are keyed appropriately, we should be able to reconstruct those associations from the original BuildEventContext and use that data however we need to.

Testing

Manual testing.
Automated testing that mimics the kind of message flow in a 'real' build for these same scenarios.

Notes

image

@baronfel baronfel added the Area: Terminal Logger Problems with the livelogger/fancylogger/terminallogger -tl functionality. label Jul 6, 2025
@baronfel baronfel force-pushed the tl-project-outputs branch from e8b4b4f to f67dc79 Compare July 7, 2025 16:12
@baronfel baronfel force-pushed the tl-forwarding-take-2 branch from 3bf44f9 to 9cc5cad Compare July 8, 2025 02:31
@baronfel baronfel force-pushed the tl-project-outputs branch from f67dc79 to 88b7025 Compare July 8, 2025 02:34
@baronfel baronfel force-pushed the tl-forwarding-take-2 branch 3 times, most recently from 1eccd8a to ce610e4 Compare July 14, 2025 14:45
@baronfel baronfel force-pushed the tl-forwarding-take-2 branch 3 times, most recently from 522ec2e to fe50034 Compare July 30, 2025 16:33
@baronfel baronfel force-pushed the tl-forwarding-take-2 branch from fe50034 to b568440 Compare July 31, 2025 16:26
@baronfel baronfel force-pushed the tl-project-outputs branch from 88b7025 to fc7901d Compare August 5, 2025 19:14
Base automatically changed from tl-forwarding-take-2 to main August 5, 2025 19:24
@baronfel baronfel force-pushed the tl-project-outputs branch from fc7901d to 922ea33 Compare August 5, 2025 19:37
@baronfel baronfel force-pushed the tl-project-outputs branch from 922ea33 to 786b1dc Compare August 7, 2025 00:26
@baronfel
Copy link
Copy Markdown
Member Author

baronfel commented Aug 7, 2025

Rebased on top of #12292 for easier tracking.

@baronfel
Copy link
Copy Markdown
Member Author

Added the do-not-merge label because in manual testing I've seen the SourceRoot lookups no longer working after these changes.

baronfel added a commit that referenced this pull request Sep 18, 2025
### Context
This change builds on #12082 by
listening to the project evaluation finished event and getting RID usage
data for the current Target. We then use this RID data to render the RID
(if any) on project status lines.

This is sliced out of #12114 to
make that PR smaller and focused on the 'new output kind detection'
feature.

### Changes Made

* Create a container for all eval-related data we capture for a project
* associate that container with a TerminalProjectInfo (since each
TerminalProjectInfo uses data from a given evaluation (paired by ID)
* make output rendering for projects more factored out for easier
reading
* include the RID in the output

### Testing

Updated existing node tests.
Manual testing.

<img width="1347" height="327" alt="image"
src="https://github.com/user-attachments/assets/39014bee-5616-4d93-883f-a55a933f0c3d"
/>
@baronfel baronfel force-pushed the tl-project-outputs branch from 52c9e5d to 07f300d Compare October 2, 2025 20:53
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it has been open for more than 180 days with no recent activity.

If you believe this work is still relevant, please feel free to reopen or create a new pull request. Thank you for your contribution!

Generated by Close Stale Pull Requests

@github-actions github-actions Bot closed this Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Terminal Logger Problems with the livelogger/fancylogger/terminallogger -tl functionality. do-not-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant