-
Notifications
You must be signed in to change notification settings - Fork 194
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 an easy way to include fabric api modules #183
Conversation
I have updated this PR, it has had minimal feedback, I think merging this is best. Its not ideal that its fabric api specific but I think its a lot better than having a whole plugin to do it. |
…arker not being published
No. The correct way to fix this is to remove the hashes. |
As what I said in the past,
|
You would also need to include the Minecraft version that the module version supports. |
No one has provided a solution to the issue the hashes solve. |
What does hashes solve? |
The hashes don't solve anything. They create more problems than they resolve. You want a solution for not being able to identify a version? Allow me to introduce you to semver. |
Ive been over why they are needed about 10 times.
And a myriad of reasons ive prob forgetten, yes they are annoying but thats what this PR sloves. Everytime this issue comes up no one provides any possible replacements, and doesnt say why they are bad. |
According to semver, a change that would render a module incompatible with a previous mc version constitutes a major version change. I'll cut it half way and suggest this:
|
Even if that were the solution, we would have to bring submodules into the question. Appended it with the fapi version? Bump every module version no matter what. What about 1.15 and 1.16, do we append 1.16 on the end of the module version? Also the scripts don't write themselves. And until someone writes them, this is just going to end up in the bikeshedding closet. |
Here's one reason:
Every time fabric updates all of its dependents are forced to update as well because you're retroactively destroying their dependency chain. |
This is just the way gradle handles it, 99% of the time the versions get updated, I think there has been 1 or 2 cases where I forgot. Each sub module follows the semver spec (the hashes are part of the semver sepc). |
Fapi depends on the modules. It specified the version of the module that's included in them. Modules should not be indicating what fabapi version they're used in.
No. Mc version is implied by the major version, since you would be bumping that every time the mc version changes. You don't need to append it on the end a second time.
Bump every module version if that module needs to be changed. Or yes, bump the major whenever you do a new build against a new mc version the same way you would (should) bump the fabapi version every time one of its modules is updated. That's how versions are supposed to work. |
No one has provided a valid solution that sloves the issues the hashes do, untill someone makes a PR or atleast provides a valid solution its not going to change. This PR will also help if that magicial solution comes into play as it would still require you to open the jar file to find the right module version for the fabric api module you want to include / depend on. This fix isnt specfic to the hashes, it helps in all cases. |
Locked this PR as its got nothing to do with the PR and is getting out of hand. I still plan to merge this as it has nothing to do specifically with the hashes. |
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.
While I worry a bit about adding fabric api-specific stuff to the other fabric projects, it would greatly improve things until we have a better solution
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.
I think something like fabricApi.module()
would make a more readable API, used like this:
implementation fabricApi.module("fabric-loot-tables-v1", project.fabric_version)
^ actually I agree with juuz here, that would be nicer |
Yes, I also agree with @Juuxel I will merge and make that change |
This does not solve the issue, this is a cheap workaround.
On a more serious note, is it possible to have this apply to projects also using the hash system but aren't fabric api? |
@TheGlitch76 thats the major issue with this, I dont see a way to make this none fabric api specfic easily. |
Imo this is more like eclipse integration for idea users. This part is not coerced on users; it will only be used when they call |
I guess this is useful but it is just a workaround until it becomes automatic in Loom. |
# Conflicts: # src/main/java/net/fabricmc/loom/AbstractPlugin.java
Not sure if I like it, it does mean adding fabric api specific code. Atleast people can stop complaining that the hashes are broken.
Code may not be great, if people actaully want this it could be improved.