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

Ascii art progress indicator messes up Gradle output #267

Closed
C-Otto opened this issue Apr 26, 2021 · 2 comments · Fixed by #321
Closed

Ascii art progress indicator messes up Gradle output #267

C-Otto opened this issue Apr 26, 2021 · 2 comments · Fixed by #321

Comments

@C-Otto
Copy link
Contributor

C-Otto commented Apr 26, 2021

2-:\7|3/ -I\ |>/W-R\I|G/:-M\n|o/ -x\t|d/a-n\rm23:48:42 PIT >> INFO : Completed in 74 seconds /
The line above is supposed to contain "WARNING". Over time, while PIT runs, the characters "\|/" are added all over the screen, overwriting existing characters.

Gradle 7
pitestVersion = '1.6.5'
junit5PluginVersion = '0.14'
implementation 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.6.0'

@C-Otto C-Otto changed the title Ascii art progress bar messes up Gradle output Ascii art progress indicator messes up Gradle output Apr 26, 2021
@davidburstrom
Copy link
Contributor

Unfortunately this is produced by SpinnerListener, which is linked up through MutationCoverage only if the output is not verbose. Since you probably don't want to turn on verbose logging, that creates a conundrum.

One option is to use https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/JavaExec.html#setStandardOutput-java.io.OutputStream- to capture Pitest stdout and only flush complete lines to Gradle stdout. Though the spinner art will not indicate progress, real output from tests will be forwarded in real time.

Alternatively, simply capture all of the output in a buffer and print it in one go at the end of task execution.

And yet another option is to use class-loader shadowing to replace the SpinnerListener with a no-op implementation, but this will all end in tears.

@szpak How do you feel about those options, and what other options do you see?

@hcoles
Copy link

hcoles commented Sep 17, 2021

This will be addressed in pitest 1.7.1, which adds a new "verbosity" param, with options to enable/disable the spinner and swallow a lot of the noise from the minions.

hcoles/pitest#934

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants