Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make mill show skip -j prefixes to ensure machine readability #2884

Merged
merged 3 commits into from
Nov 19, 2023

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Nov 19, 2023

This requires us add another method Logger#rawOutputStream, which the various implementations forward without decorating with prefixes or other things.

We cannot just use SystemStreams.original because when running Mill in client/server mode we still need to use the OutputStream that gets forwarded from server to client, as the SystemStreams.original.out just ends up forwarded to out/mill-worker-hash-1/stdout files that aren't surfaced to users

Tested manually with ./mill -i dev.run tmp -i -j 2 show foo on an example build in the tmp/ folder. Previously it would show the output of show with a prefix e.g. [#0] "bar", after this PR it shows the output without any prefixes "bar"

Logger#rawOutputStream has to be a non-abstract method for binary compatibility. This makes it a bit error prone since you can easily forget to override it where necessary. So I first made it abstract, made sure everyone overrides it, and then added the default case.

Pull request: #2884

@lihaoyi lihaoyi requested review from lefou and lolgab November 19, 2023 03:28
@lefou lefou linked an issue Nov 19, 2023 that may be closed by this pull request
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@lihaoyi lihaoyi merged commit d6f56f8 into com-lihaoyi:main Nov 19, 2023
37 checks passed
@lefou lefou added this to the 0.11.6 milestone Nov 19, 2023
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.

[Feature Request] Better output for mill show
2 participants