This repository was archived by the owner on Jan 14, 2021. It is now read-only.
add switch to ignore bad comparer error #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?