Tyrrrz / CliFx

Class-first framework for building command-line interfaces
MIT License
1.5k stars 61 forks source link

Tests sometimes throw ArgumentOutOfRangeException on Windows CI #55

Closed domn1995 closed 4 years ago

domn1995 commented 4 years ago

See the following test run where Command may throw a specialized exception which shows only the help text FT throws an ArgumentOutOfRangeException: https://github.com/Tyrrrz/CliFx/pull/54/checks?check_run_id=676614514

Then another run with no changes and it works fine: https://github.com/Tyrrrz/CliFx/pull/54/checks?check_run_id=676630738

Not sure there's anything we can do about since it seems to be happening in the underlying Windows API, but worth documenting anyway.

Tyrrrz commented 4 years ago

Do you have a guess what causes it?

domn1995 commented 4 years ago

I have no idea. It seems to only happen in the Windows CI, and I can't replicate it locally (Windows box as well).

Here's the relevant dotnet code that's throwing (specifically the condition on line 99): https://github.com/dotnet/runtime/blob/65f56b8073728a9e0456e0528a42f99bbb8c0e7b/src/libraries/System.Private.CoreLib/src/System/Text/EncoderNLS.cs#L87-L116

Tyrrrz commented 4 years ago

Seems like it's no longer happening after the recent changes. Closing this for now, see if it comes back (hopefully not 🤞 )