Remove some Fabric shorthands#38
Draft
PaintNinja wants to merge 3 commits into
Draft
Conversation
Shorthands can be nice, but too many can introduce ambiguity and inconsistency
lukebemish
reviewed
Jul 18, 2024
| it.'fabric-api' = "*" | ||
|
|
||
| mod "another-mod", ">=1.5.0" | ||
| mod("something-else", v(">0.5") & v('<1.0')) |
Member
There was a problem hiding this comment.
I would like a version range combination test like this to remain in the file still
Member
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shorthands can be nice, but too many can introduce ambiguity and inconsistency - this PR proposes to remove some in order to help with that.
There's some other cases not included in this PR yet but may be worth considering a redesign:
jars { jar { file = "nested/vendor/dependency.jar" } jar "nested/vendor/another-dependency.jar" }Should we add a jar(String) adder shorthand to the root? Should the shorthand be removed altogether or the jar(Closure) removed instead?
mixins { mixin "modid.mixins.json" mixin { config = "modid-server.mixins.json" environment = Environment.SERVER } }Should we have closures for client, server and common inside the MixinsBuilder?
icon { x16 = "small.png" x32 = "medium.png" } icon 64, "large.png"Should we remove the icon(int, String) adder shorthand and replace it with an
icon = "medium.png"setter shorthand in the root?