Skip to content
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

Shorter/Improved remapped names #1164

Open
solonovamax opened this issue Sep 2, 2024 · 3 comments
Open

Shorter/Improved remapped names #1164

solonovamax opened this issue Sep 2, 2024 · 3 comments

Comments

@solonovamax
Copy link
Contributor

Currently, when mods are remapped by loom, they result in names that look like the following:

loom_mappings_1_19_4_layered_hash_40359_v2.net.fabricmc.fabric-api:fabric-data-generation-api-v1:11.5.2+26f09d40f4

This name is quite long and unwieldy, and is annoying to look at in your IDE when attempting to find the sources for a particular library.

I would like to propose that instead when remapping, the loom_mappings_1_19_4_layered_hash_40359_v2 bit can be replaced with, for example, a 6 character MD5 hash of the minecraft version & the mappings used (ofc properly accounting for layered mappings). eg. minecraft 1.21.1 using yarn mappings version 1.21.1+build.3 might result in the following remapped mod name:

remapped_cd6b1a.net.fabricmc.fabric-api:fabric-data-generation-api-v1:11.5.2+26f09d40f4

cd6b1a is derived from the first 6 characters of the MD5 hash of minecraft-1.21.1:net.fabricmc-yarn-1.21.1+build.3. minecraft-[version] is used to indicate the minecraft version, and [mappings group]-[mappings module]-[mappings version] is used for the mappings used. They are concatenated with a : to separate them.

another alternative to prefixing the hash in front of the group id would be to prefix it in front of the version:

net.fabricmc.fabric-api:fabric-data-generation-api-v1:remapped-cd6b1a.11.5.2+26f09d40f4

this would keep some of the more important information at the front, such as the group id and module name.

@modmuss50
Copy link
Member

Yes, I I do think we can improve this. We do need to make sure that the group is diffrent, it could maybe even be something as small as.

abc123.net.fabricmc.fabric-api:fabric-data-generation-api-v1:11.5.2+26f09d40f4 🤔

@solonovamax
Copy link
Contributor Author

@modmuss50
Yes, I I do think we can improve this. We do need to make sure that the group is diffrent, it could maybe even be something as small as.

abc123.net.fabricmc.fabric-api:fabric-data-generation-api-v1:11.5.2+26f09d40f4 🤔

why specifically the group id?

@solonovamax
Copy link
Contributor Author

also tbh I was originally gonna put smth like that but I wasn't sure if it was clear enough where the hash was coming from

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants