HiranChaudhuri / OoliteStarter

This repository has moved. You can find it now at https://github.com/OoliteProject/OoliteStarter
https://github.com/OoliteProject/OoliteStarter
GNU General Public License v3.0
16 stars 0 forks source link

Support 'maximum_version' in case of conflict #18

Closed yomli closed 5 months ago

yomli commented 5 months ago

Is your feature request related to a problem? Please describe. Right now, maximum_version is discarded: https://github.com/HiranChaudhuri/OoliteStarter/blob/bde5384b9bc304c1d296d75588a4081dbc32e432/src/main/java/oolite/starter/Oolite.java#L721-L722

The issue occurs with the combination of Telescope 2.14 and HUD Selector 1.26. Telescope is only in conflict with HUD Selector prior to 1.17:

{
    "identifier" = "oolite.oxp.Norby.HUDSelector";
    "maximum_version" = "1.17";
    "description" = "1.18 adds new feature (multiple HUD/worldScript); Telescope monkey patches for multiple MFDs";
}

So OoliteStarter marks the combination as a conflict, although the game runs fine. I checked, and Telescope is the only OXP to feature this parameter when not applying to an older version of itself. Therefore, it's not a bug, but could be a good feature.

Describe the solution you'd like Store maximum_version. During the validateConflicts run, check if version is superior to maximum_version, and if so, drop the OXP from the list of conflicting expansions so it doesn't count as a conflict.

Describe alternatives you've considered Rewriting the manifest.plist file of Telescope each time I update it, but if others OXP start to use this parameter it'll be a mess.

HiranChaudhuri commented 5 months ago

That is indeed room for improvement. I checked the code and putting all this into one string is probably not sufficient. We'll have to rewrite the depencency handling.

yomli commented 5 months ago

Don't worry, it's not urgent. I have to run the Python script for Telescope with each update, so rewriting the manifest.plist file is trivial. Also, the game runs fine despite of showing this conflict. I opened this feature request in order for you to keep that in mind if you rewrite the dependency/conflict handling, and to show to newcomers that this particular conflict is fine.

HiranChaudhuri commented 5 months ago

In this branch the information is not longer discarded - but it is also not yet used. Want to help defining test cases that I can implement against? How should the system behave?

HiranChaudhuri commented 5 months ago

The requested changes are contained in OoliteStarter v0.1.27-fantail.2. Could you confirm it works as expected?

yomli commented 5 months ago

fantail.2-Windows.exe and fantail.3-Windows.exe don't launch the startup wizard on Windows, only fantail.1-Windows.exe does. I'm testing this by using the generic version, replacing the OoliteStarter .jar in OoliteStarter.cfg and… sorry, but it's worse. Every expansion which contain a conflict is flagged as problematic, even if none of its potential conflicts is installed.

But the good news is: HUD Selector isn't flagged as problematic when Telescope is installed!

2024-01-13 05_26_56-L__media_jeux_Oolite_oolite app 1 91 - OoliteStarter 0 1 27-fantail 3

HiranChaudhuri commented 5 months ago

Indeed I found something to improve. For the conflicts, please check OoliteStarter v0.1.27-fantail.4

For the startup wizard issue let's investigate in a separate issue.

yomli commented 5 months ago

fantail.4 works as intended, no conflict found. Good job!

HiranChaudhuri commented 5 months ago

Thank you. I will merge then.