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

Add fabric mod used when quilt version exists log processor #86

Conversation

anonymous123-code
Copy link
Contributor

  • Additionally extract the mod type and hash from the mod table
  • When for all fabric mods, do a hash lookup via the Modrinth's version_files API.
  • Get the project of all of the versions not marked as compatible to quilt using Modrinth's projects API
  • Get the versions of all of the projects where a version with the right mc version and a version with quilt support exists using Modrinth's versions API
  • For all versions supporting the mc version and explicitly supporting Quilt:
    • Compare the versions (with mod markers removed) using FlexVer, if the version on modrinth is larger or equal to the installed mod's version, add it to the upgrade options for that mod.
  • For all mods with such an upgrade option:
    • If only a single option exists, link to that directly
    • else link to all versions for the mc version supporting quilt

As all the API requests are batch requests, a maximum of three (sequential) API requests are required.

image

@anonymous123-code
Copy link
Contributor Author

Fixes #85

Copy link
Member

@sschr15 sschr15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've finally made it to true enterprise level code with a name like FabricModUsedWhenQuiltVersionExistsProcessor

All jokes aside, it looks good from here and I'll double check when I get to a computer

@anonymous123-code
Copy link
Contributor Author

I'm very open for better naming ideas, but at least it's descriptive

Copy link
Member

@sschr15 sschr15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that I've sat down and given a more thorough look through things with a large screen, I've found a couple oddities. Other than these, the code looks pretty good

Co-authored-by: sschr15 <[email protected]>
Copy link
Member

@sschr15 sschr15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, will merge if CI passes

@sschr15 sschr15 merged commit 9b40580 into QuiltMC:root Feb 8, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

Log parsing: Check for all fabric mods if a quilt version exists
2 participants