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

fix(ProgressReport): Replace progress reporting #1286

Merged
merged 10 commits into from Feb 5, 2021
Merged

fix(ProgressReport): Replace progress reporting #1286

merged 10 commits into from Feb 5, 2021

Conversation

eNeRGy164
Copy link
Contributor

@eNeRGy164 eNeRGy164 commented Oct 26, 2020

Implement ShellProgressBar and make MutantsResultReporter obsolete

This is a WIP, to first get some feedback.
Added Unit testing.

Closes #519

Implement ShellProgressBar and make MutantsResultReporter obsolete
@rouke-broersma
Copy link
Member

Looks good to me 🐝

@eNeRGy164 eNeRGy164 marked this pull request as ready for review October 27, 2020 14:45
@rouke-broersma
Copy link
Member

rouke-broersma commented Oct 27, 2020

Mhm after testing it looks like the fancy progress bar does not work correctly in the visual studio debug console

This happens only when debug logging is turned on
image

In git bash it fails completely

image

It does work in CMD, but only with debug logging off:

image

Git bash and the visual studio debug console are probably not the main shells used to run stryker but it suggests to me that the used library does not support all shells so a bit more error handling could not hurt.

Especially the issue in git bash is concerning because that is the same issue we noticed on macOSX before and is why we disabled replacing values when Console.CursorTop caused an exception:

private bool EnvironmentHasConsole()
{
try
{
var t = Console.CursorTop;
return true;
}
catch (System.IO.IOException)
{
return false;
}
}
}

@eNeRGy164
Copy link
Contributor Author

Mpdreamz/shellprogressbar#22
Some of these seem to be there for a while.

@rouke-broersma
Copy link
Member

Does anyone know someone with a mac that could test this pr? 😅

@richardwerkman
Copy link
Member

@vngrp has a mac, maybe he could take a look?

@eNeRGy164
Copy link
Contributor Author

I have no environment to recreate these issues.

Works for me:

  • Windows PowerShell 5.1
  • PowerShell Core 7
  • Windows cmd
  • PowerShell terminal in VSCode
    image
  • Visual Studio Debug Conole
    image

@eNeRGy164
Copy link
Contributor Author

Mhm after testing it looks like the fancy progress bar does not work correctly in the visual studio debug console

This happens only when debug logging is turned on

Ah missed that remark.
Yes, you can't have multiple processes doing console output at the same time if one is messing with the positions, like in this case the progressbar. That is also why I had to merge the mutant reporting and the progressbar in one output.

@rouke-broersma
Copy link
Member

Mhm after testing it looks like the fancy progress bar does not work correctly in the visual studio debug console
This happens only when debug logging is turned on

Ah missed that remark.
Yes, you can't have multiple processes doing console output at the same time if one is messing with the positions, like in this case the progressbar. That is also why I had to merge the mutant reporting and the progressbar in one output.

Unfortunately that seems like a regression compared to the current implementation (on some terminals).
We're going to do more testing to decide what to do with this pr, as it stands it looks like we're gonna have to decide between regressions on the one hand or other issues on the other hand.

Sorry for the wait.

@eNeRGy164
Copy link
Contributor Author

No problem, it's your project after all.
I just can't reproduce the errors, so it's hard to fix them myself.

@eNeRGy164
Copy link
Contributor Author

For showing addition logging we could reroute to the WriteLine function mentioned here: Mpdreamz/shellprogressbar#31 (comment)

@rouke-broersma
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rouke-broersma rouke-broersma merged commit 3fa0c68 into stryker-mutator:master Feb 5, 2021
@eNeRGy164 eNeRGy164 deleted the progress branch May 26, 2021 14:33
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.

Progress bar appending instead of replacing values inline (Macos 10.14.5)
3 participants