Skip to content

Conversation

@bripeticca
Copy link
Contributor

Currently branched off of swb/diagnosticcodesnippet.

* Built tentative test class SwiftBuildSystemOutputParser to
  handle the compiler output specifically
* Added a handleDiagnostic method to possibly substitute the
  emitEvent local scope implementation of handling a
  SwiftBuildMessage diagnostic
* the flag `appendToOutputStream` helps us to determine whether
  a diagnostic is to be emitted or whether we'll be emitting
  the compiler output via OutputInfo
* separate the emitEvent method into the SwiftBuildSystemMessageHandler
* Remove taskStarted outputStream emissions
* Propagate exception if unable to find path
The TaskDataBuffer introduces some extra complexity in its
handling of various buffers we'd actually like to track and
emit, rather than ignore.

We will keep multiple buffers depending on the information we
have available i.e. whether there's an existing task signature
buffer, taskID buffer, targetID buffer, or simply a global
buffer.
If there is no command line display strings available for a failed
task, we should demote this message to info-level to avoid cluttering
the output stream with messages that may not be incredibly helpful.

To consider here: if this is the only error, we should be able to expose
this as an error and perhaps omit "<no command line>".
* Defer emission of diagnostics to completed task event
* Remove global data buffer from TaskDataBuffer
* Remove emits to observabilityScope for taskStarted events
* Move SwiftBuildSystemMessageHandler to its own file
* Rename printToOutput to print(_ output:verbose:)
* Remove unprocessedDiagnostics parameter from message handler
* Remove taskIDsEmitted in favour of using tasksEmitted
Modified the map to track these by targetID rather than name;
since the `BuildResult` is expecting a map by targetName, another
computed property representing the same map by targetName has also
been added
…t stream

Some minor fixes to how task output is handled in the SwiftBuildSystemMessageHandler.
@bripeticca
Copy link
Contributor Author

Now merged into #9362

@bripeticca bripeticca closed this Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant