ferium icon indicating copy to clipboard operation
ferium copied to clipboard

Sort by game version when game version checking is disabled

Open ItsProfessional opened this issue 1 year ago • 6 comments

Description

When using the command:

ferium add smooth-swapping

It shows: "The project is not compatible", even though it clearly has a 1.20 version on the mod download page. When using --dont-check-game-version, it downloads smoothswapping-0.9.2-1.19.2-fabric.jar, even though the mod has a 1.20 version which has file name smoothswapping-0.9.2-1.20-fabric.jar

Steps to reproduce

  1. Run ferium add smooth-swapping --dont-check-game-version
  2. Run ferium upgrade
  3. In the output folder, the mod downloads the 1.19.2 version of the mod

Operating System

Linux

Are you using the latest version of ferium?

  • [X] I am using the latest version of ferium

Additional Information

I think that this is occuring because, if you go to the versions page of the mod, the latest-uploaded build of the mod is for 1.19.2, slightly below which is the 1.20 version (the mod version is the same for both).

This can be solved by checking if there is a build of the mod that is for the latest version of minecraft instead of just saying "not compatible" if the latest-uploaded build is for an older version.

Essentially, retrieve the MOD VERSION for the latest build of a mod, and then recursively loop through all builds with that MOD VERSION, and select the one that is for the minecraft version of the ferium profile

ItsProfessional avatar Aug 31 '23 11:08 ItsProfessional

What version is there in your profile?

theRookieCoder avatar Aug 31 '23 14:08 theRookieCoder

What version is there in your profile?

smoothswapping-0.9.2-1.19.2-fabric.jar in the output folder, if that's what you mean. edit: if you mean game_version, then 1.20.1 with quilt

ItsProfessional avatar Aug 31 '23 14:08 ItsProfessional

Ah then the issue is that your profile has 1.20.1 specified while the mod only says it works till 1.20. Unfortunately like you said the problem is that when the game version check is disabled it will pick the latest chronological release which might not be the latest Minecraft version.

This should be resolved by allowing versions without breaking changes to also be considered compatible which should be possible with filters (#155)

theRookieCoder avatar Aug 31 '23 15:08 theRookieCoder

Well you solved half of the issue. This issue lists 2 problems

  1. Ferium add doesn't work if the version number of the latest build isn't the exact minecraft version of the profile
  2. Ferium downloads the latest uploaded build, which may be of any minecraft version, instead of the latest build that is of the version that the profile is of. Even if my profile was 1.20, then it would still download the 1.19.2 version because of this problem

I think that this is occuring because, if you go to the versions page of the mod, the latest-uploaded build of the mod is for 1.19.2, slightly below which is the 1.20 version (the mod version is the same for both). Retrieve the MOD VERSION for the latest build of a mod, and then recursively loop through all builds with that MOD VERSION, and select the one that is for the minecraft version of the ferium profile

Problem 2 is still unresolved.

ItsProfessional avatar Aug 31 '23 15:08 ItsProfessional

Ferium add doesn't work if the version number of any available build doesn't match the profile game version. It doesn't just check the latest version but checks every version available to find one marked with the same game version as your profile.

Ferium downloads the latest uploaded build that is compatible with your mod loader

This is only if you have disabled the game version check by using --dont-check-game-version when adding. It's admittedly a very crude workaround for lackluster flexibility in version resolution. However if your profile is in 1.20 and you add the mod without disabling game version checking, it should 'short-list' the versions compatible with your profile and pick the latest uploaded one.

theRookieCoder avatar Aug 31 '23 16:08 theRookieCoder

However if your profile is in 1.20 and you add the mod without disabling game version checking, it should 'short-list' the versions compatible with your profile and pick the latest uploaded one.

I think this should also be the case if I disable game version checking. If I disable game version checking, I expect it to download the latest build that is for the latest version of Minecraft (with the modloader of my profile, of course)

I only see "disable game version checking" as an option to bypass ferium add's "project not compatible" message, I don't expect it to alter the way ferium upgrade works.

ItsProfessional avatar Sep 01 '23 05:09 ItsProfessional