Support more kinds of project 'outputs' in Terminal Logger#12114
Closed
Support more kinds of project 'outputs' in Terminal Logger#12114
Conversation
e8b4b4f to
f67dc79
Compare
3bf44f9 to
9cc5cad
Compare
f67dc79 to
88b7025
Compare
1eccd8a to
ce610e4
Compare
522ec2e to
fe50034
Compare
fe50034 to
b568440
Compare
25c8723 to
346d146
Compare
88b7025 to
fc7901d
Compare
fc7901d to
922ea33
Compare
922ea33 to
786b1dc
Compare
Member
Author
|
Rebased on top of #12292 for easier tracking. |
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" />
…render multiple outputs
Next step is to add more tests around plural outputs and other kinds of outputs.
52c9e5d to
07f300d
Compare
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!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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 buildTo 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
TerminalProjectInfotoo.Getting Outputs for relevant Targets and Tasks
There are three kinds of scenario we need to handle to get Target/Task outputs
This is the easiest case - in this case we get
TargetFinishedEventArgsthat containTargetOutputson 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 theTargetFinishedEventArgsbecause other rendering cares about tracking this.In this case, we need to start looking at
TargetStartedEventArgsand capture the contexts for the Targets that we care about.If we later get a
TargetSkippedEventArgsfor any of those targets, we can then listen for matchingTaskParameterEventArgswith aKindofSkippedTargetOutputs, forward those to the central node, and the central node can inspect that message'sItemsin the same way as the 'normal' Target-completion scenario.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
TerminalProjectInfostructure 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