-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependency Overrides are confusing #447
Comments
This comment only addresses the first point. I agree with the other 3. Generally, dependency overrides are expected to be commonly used for fixing broken or slightly incorrect dependencies. The most common examples are:
The "simplest" way to fix these, as an end user, would be to remove every mod dependency on {
"pattern": ".+",
"fuzzy": true, // Theoretical field
"depends": {
"remove": "minecraft"
}
} This would work for most mods, but would be horribly broken for multi-version mods - where a single mod depends on a "compatibility layer" mod, and the mod includes multiple compatibility layer versions. For example a mod might look like this: "id": "my-mod",
"version": "1.4.1",
"depends": { "my-compatibility-layer" } and include 3 mods like this: "id": "my-compatibility-layer-mc-1.20",
"version": "1.4.1",
"provides": "my-compatibility-layer",
"depends": { "id": "minecraft", "version": "=1.20" } "id": "my-compatibility-layer-mc-1.21",
"version": "1.4.1",
"provides": "my-compatibility-layer",
"depends": { "id": "minecraft", "version": "=1.21" } "id": "my-compatibility-layer-mc-1.21.1",
"version": "1.4.1",
"provides": "my-compatibility-layer",
"depends": { "id": "minecraft", "version": "=1.21.1" } Now, if the above dependency override was applied to the whole mod the actual compatibility layer loaded would be random. (There would probably be a warning like This is the primary reason why I don't like the idea of allowing both fuzzy and pattern matching. |
My main issue with dependency overrides is that we expect the end user to know quite a lot about multiple json formats – some of which differ in very subtle, but important, ways.
I think a much better solution is to offer a GUI in quilt-loader to modify the override json file for them – that way quilt-loader can deal with all the json translation, and the user can just view all dependencies that mods have, and modify them easily. (I’m not sure exactly what this gui should look like though – using the existing tree system would probably be the easiest, but not look particularly good). (Adding a gui doesn't stop us from better documenting the format though) |
Would making fuzzy work for only id then make sense? Or could that still have issues with what you suggested. |
It depends on how a compatibility layer mod is setup - if they differ only in version (id is |
Hm, what if fuzzy id only worked if there was just one load option providing the id (print a warning that it found multiple potential matches or something)? Might make things more complicated (and is that even possible with the solver setup?) but could make the feature more accessible to users. |
My main issue against a GUI is that I worry people would get over zealous with their overrides to make things work and that would cause more issues. I do think it should be used sparingly. You could also only enable the GUI with a specific set of ids (say Minecraft, loaders, qsl/fapi), but hardcoding loader like that probably isn't a good idea, or with a flag. You could also have something show up if there is such a conflict with a link to the dependency override wiki page (with its overhaul) and that would explain what they are and that they should only be used if the user knows what they are doing (aka Here be dragons!) |
Honestly, I'm not that worried about people over-using dependency overrides to get around genuinely correct dependencies - because they will quickly learn than no, just adding an override for an old mod on its minecraft dependency doesn't let you launch the game with that mod. (Plus, if a user added a dependency themselves, and it crashes immediately afterwards, they will probably be aware of what they did). I'm more worried by users trying to learn (potentially) a new file format (json), the specification for that file, and trying to do something that has consequences that aren't easy to understand (like "override all minecraft dependencies") and it crashing in odd or unexpected ways, or if they added a new mod much later that has these complex versioning system. What does worry me about a gui is users removing genuinely correct "breaks" clauses that don't cause crashes, but do cause other obvious issues that cause uses to complain to mod developers that added those breakages. |
A couple issues with dependency overrides:
Fuzzy matching is only enabled for path based overrides. Id and pattern overrides need to match exactly. Maybe making this an option in the json that has to be enabled.
Documentation in the loader wiki is currently out of date. It does not mention the path or pattern options at all.
Documentation example aren't useful. Providing some complete override files for common examples (ie replacing a dep, removing, etc) would make things easier for users.
Maybe also some tests to provide some better coverage.
The text was updated successfully, but these errors were encountered: