-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Console Color not reset? #249
Comments
Yes, it's quite likely there are either multiple instances using different semaphore locks, or possibly even just loggers being written to async. Unfortunately there's no easy way to make the coloured output "atomic" across multiple console writers using these APIs (here, we can only serialise writers that use the same lock object, the A good option to work towards is to move away from the However, until that happens, the best we can do is make sure we serialise console writers. |
Note that if Console.Write throws (don't know if there is a scenario where that happens) or some other exception happens than the console color will not be reset either. Also note that I'm not really too much concerned about wrong colors within the run. All I currently care about is that expecto should leave my shell in a sane state :/ |
See #248 - I think the case is that we're not waiting for the console printer to finish |
Can I somehow workaround? |
You can change all |
I have no idea what you are talking about :) |
Yes there is in the first link |
So it will no longer be async basically? |
Yes, it being async means it's not blocking your output (which means in turn it doesn't reset the colour) |
This is what the output looks like in Logary proper; we have a different way of handling data there. I think we should have a design session around how to handle modern terminals and how to deal with structured output (and not just structured logging/data of messages). Also, we should move to ANSI escape sequences, opted out automatically for terminals it's known not to work with. Here's the PR for the new Facade causiq/logary#335 |
Yes there are a few console issues that should be addressed together. Would be good to perfect the output. I'm in the highlands of Scotland next week so may not be so easy to stay in touch. |
resolved with #258 |
From time to time I see fsprojects/FAKE#1858 in my shell.
And somehow I feel like expecto is to blame here.
Regarding
expecto/paket-files/logary/logary/src/Logary.Facade/Facade.fs
Lines 709 to 720 in 04f12c0
Is it possible that multiple
LiterateConsoleTarget
instances exist for example? Or that the execution is cancelled because another test has failed and it doesn't reset the color in that scenario? Is there anything that comes to mind?The text was updated successfully, but these errors were encountered: