-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add dependency overrides #214
base: main
Are you sure you want to change the base?
Conversation
Last commit published: 3ca3e7b0d1197d9170803e119acd027d6dfb586f. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #214' // https://github.com/neoforged/FancyModLoader/pull/214
url 'https://prmaven.neoforged.net/FancyModLoader/pr214'
content {
includeModule('net.neoforged.fancymodloader', 'loader')
includeModule('net.neoforged.fancymodloader', 'junit-fml')
includeModule('net.neoforged.fancymodloader', 'tests')
includeModule('net.neoforged.fancymodloader', 'earlydisplay')
}
}
} |
“dependencyOverries” |
Simple and you even added tests! <3 |
# Dependency overrides can be used to forcibly remove a dependency constraint from a mod or to force a mod to load AFTER another mod | ||
# Using dependency overrides can cause issues. Use at your own risk. | ||
# Example dependency override for the mod with the id 'targetMod': dependency constraints (incompatibility clauses or restrictive version ranges) against mod 'dep1' are removed, and the mod will now load after the mod 'dep2' | ||
# dependencyOverrides.targetMod = ["-dep1", "+dep2"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to show the expanded syntax instead? idk
[dependencyOverrides]
targetMod = ["-dep1", "+dep2"]
targetMod2 = ["-dep3", "-dep4"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, I feel like this is clear enough. And besides, multi-line doesn't really work with comments.
This implements a simple system that allows users to override dependency constraints using the fml config by adding an entry as follows:
Minus can be used to soften dependency constraints (version range becomes unbounded, type becomes optional, but the ordering stays the same) and plus can be used to add an ordering dependency (the target mod will load AFTER the dependency)
All overrides are marked in the log at WARN level for visibility.
Closes #52