Conversation
|
Originally brought up with dotnet/corefx who said this should rather be proposed here: https://github.com/dotnet/corefx/issues/38006 |
|
I am surprised to see this on Mono only. .NET Framework has same behaviour for 4.5+ version unless Terraria explicitly opt outs which would be very strange because this is programmers issue which could manifest in unexpected results when ignored. |
|
Any chance for this to go into mono/corert? It is just a switch to allow the potentially problematic behavior for backwards compatibility. There's at least one other game (Blueberry Garden) that exhibits the same error as Terraria, so this would add an option for some backwards compatibility with older code. The man page entry can also clearly state that this should only be used in exceptions. dotnet/corefx doesn't seem to think it's meaningful to integrate this into .NET:
|
This is a backwards compatibility fix that I propose. Issue identified when trying to run Terraria and throwing the ArgumentException.
Ironically, the function is still called
ThrowOrIgnoreBadComparer, but now it only throws.This patch allows disabling the error on bad comparer implementation by setting the environment variable
MONO_IGNORE_BAD_COMPARER. This fixes the error with Terraria, as well as Blueberry Garden on my testing.The following diff adds a corresponding entry to the man page (as a gist here because it is for code in mono/mono repo): https://gist.github.com/rfht/9c65f7afc8f3ff1a44a8057809dbf1f7
Are there downsides to allowing this simple switch for legacy mono4 applications that used to get by with a bad comparer that I may not have considered?