Ledger
Ledger copied to clipboard
Don't depend on *the entire Fabric API* all at once
Is your feature request related to a problem?
Fabric API as a whole is huge and performs a lot of modifications to the game (past only adding mixin hooks). Ledger currently declares a dependency on the entire thing, rather than only the modules it uses. This means I can't use Ledger without having to also bring in the entire Fabric API, even though Ledger does not require the entirety of Fabric API to function.
Describe the solution you'd like.
Declare dependencies on individual Fabric API modules rather than the entire package. Here's a complete list of all the Fabric API modules that Ledger currently depends on:
- fabric-api-base
- fabric-commands-v0
- fabric-networking-api-v1
- fabric-events-interaction-v0
- fabric-events-lifecycle-v0
This list was created by manually analyzing all Fabric API imports. All in all, this is a pretty reasonable set of dependencies considering what Ledger's doing - I think it's a bit much to require all of Fabric API's 43 different modules (I counted) just to use 5 of them.
This solution has two small drawbacks:
- You currently have 2 sources of truth for your dependencies - your
fabric.mod.json
, andlibs.versions.toml
. This would increase the number of dependencies that have to be kept in sync between them. - In development, it would be a minor inconvenience to depend on an additional Fabric API module.
However, I believe they are outweighed by the benefits of declaring your dependencies more granularly.
Describe alternatives you've considered.
The only other alternative I can think of is to completely remove the dependency on Fabric API, but that would be pretty dumb because then you'd have to reinvent the wheel.
Agreements
- [X] I have searched for and ensured there isn't already an open issue regarding this.
- [X] I have ensured the feature I'm requesting isn't already in the latest supported mod version.
Other
It really took me a while to fit my feature request into this issue template.