Mod Bisect, for quickly locating problematic mods
Role
I use Prism Launcher to manage mods and create modpacks.
Suggestion
I want to be able to press a button to automatically perform a "bisect" on all mods (think git bisect), which launches the game repeatedly but disables or re-enables half of the mods at a time, to locate problematic ones.
Benefit
Doing this process of disabling and re-enabling groups of mods and relaunching the game is an incredibly common practice to determine exactly what mod(s) may be causing some issue when logs or crash reports are unavailable or not helpful enough. Being able to do this directly in Prism Launcher would be incredibly invaluable.
This suggestion is unique
- I have searched the issue tracker and did not find an issue describing my suggestion, especially not one that has been rejected.
You may use the editor below to elaborate further.
I propose that a new button be added to the right side of the mods screen, alongside the "Download Mods" or "Check for Updates" buttons, called "Bisect Mods" (or similar). Pressing this button would open up a screen where the individual could choose several mods to "lock" (that would always remain enabled throughout the process), and then press a start button to repeatedly launch the game by disabling and re-enabling groups of mods (respecting dependencies) based on whether or not a problem occurs in the mod set.
The process of using this feature would be as follows:
- The user presses the "Bisect Mods" (or similar) button, chooses options for the process and locked mods, and presses "Start". The process can be canceled at any time with a "Cancel" button.
- The application selects all mods to be used, for disabling later.
- The application launches minecraft with all selected and locked mods, until the user closes it manually - the user would use this time to locate if the problem occurs within the selected mod set.
- After Minecraft is closed (or killed or crashed, really just when it ends) - the application prompts the user with the question "Does this mod set work properly?"
- If the user clicks "Relaunch Game", the game will repeat steps 3-4 with the same mod set. Otherwise, depending on whether the user clicks "Yes" or "No" (as well as based on previously collected data), some mods are deselected/reselected.
- Steps 3-5 are repeated until some mods are singled out of the group as the clearly problematic set. This final set indicates all sets of mods that must be present for the issue to occur (usually just two mods and one set in total); removing any of the mods in the set would lead to the issue disappearing.
Potential Issues and Nuances
Besides leaving the existing disabled/enabled mod states overall unchanged (or just resetting it when the process is complete or canceled), there are some issues/nuances when it comes to implementing this feature. Overall, it would be nice to just have this feature in general, but it would be even better if these problems were dealt with effectively in the implementation.
Mod Dependencies
I mentioned this briefly, but any implementation of this needs to respect mod dependencies, otherwise the game won't launch. For example, it's not possible to temporarily disable a library mod without also disabling every other mod that depends on that library mod. Thus, to locate the problematic mod(s), it's necessary to first disable the dependent mods and test the issue, then afterwards test the library mods themselves.
Heisenbugs and Inconsistencies
While it is typically uncommon, there is a possibility that an issue may only occur sometimes and in rare situations; this may lead to the user inconsistently clicking "Yes" or "No" on the same mod set. A bug that only occurs sometimes - like a race condition - is often called a "Heisenbug". Any proper implementation should detect this and let the user know - either idealy using a more rigid process to filter out false negatives (For all intensive purposes I don't believe it's necessary to deal with false positives - if the user says there's a problem, there's almost definitely a problem), or just bailing out of the process as a whole with a message to the user.
Trinary and N-ary Problem Sets
While it is incredibly rare in my experience to have more than two mods (a binary mod set) in a problematic mod set, it sometimes does occur. While two mods together may not have any issues, three mods together might - or perhaps four, or five, or so on. A good implementation should be able to detect this, despite it being rare.
Source: PrismLauncher/PrismLauncher