Skip to content

Conversation

isakstenstrom
Copy link
Collaborator

This PR removes all temporary lines from a invocation log by parsing the ANSI escape codes, so that the log looks like it should when the invocation is done.

I found no golang library that does this kind of manipulation, so I wrote my own implementation. It is not a general solution, but it seems to work for the escape codes that Bazel uses in its output.

Before:
image

After:
image

Tested with Bazel 7.6.1, 8.0.1, 8.4.1.

@isakstenstrom isakstenstrom changed the title Cleanup invocation logs by removing all temporary lines Normalize invocation logs Sep 25, 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