Closed durganmcbroom closed 7 months ago
Also I'm unsure if you can see, but the tests failed:
Checksums removed (will branch off once this gets merged) and headers added.
Sorry for the delay,
One thing I'm wondering is how useful this would be inside cursemaven. You have your own key, and the ability to write the code, so is it worth you separating this out into your own project? The dependencies inside the POM are a bit of a "best guess", and it's very complicated to even obtain this information.
There's not many upsides of trying to automatically resolve dependencies, as that's not really how playing the mods work. You always have to add the mods yourself, or if you're making a modpack you have to define the dependencies yourself. Either way, it's usually left up to the user/developer to figure it out, and thus there's not great support for it.
A worry I have with this is that it's possible with this that it resolved to a dependency that simply doesn't work with the mods, and as the POM only returns one working version id will be difficult to override. Ideally, mods on curseforge would statically define their dependencies, and mods would follow correct semver versioning and everything would work nicely, but in reality that is not the case.
Let me know what you think, and if you need help with setting up / hosting a new project I'm happy to help.
Based on your/the communities needs for this project are I would agree that this POM information is probably not inline with that. In terms of the current workflow for users figuring out mod dependency information themselves, thats what i've been looking to write a better solution for; as this isn't how any modding frameworks/tools already work though I think your suggestion of branching out into a separate project might be the best bet as to not muddy up your codebase here.
I really appreciate all your help and time spent on this! If semi(🥲)-accurate dependency information ever becomes a needed-feature for other use-cases I'd be happy to reopen and work on it further with you!
Hey, sent you a message on discord already, but here's some more info if you didn't get it:
Features
Pom resolution:
Child dependency resolution (given a project ID (no file), given the publication date of the parent mod, given a Game ID, and given gameVersion information [which includes modloader/minecraft version]):
Checksums: Added SHA1 and MD5 checksums to both the '.pom' and '.jar' routes. To create a checksum for the pom, I had to add the node library 'crypto' and digest the output of whatever the pom route produces. For the '.jar' route, we can just fetch the mod metadata and return its checksum.
Mod Metadata Included 3 functions for fetching mod metadata, either of an entire project, specific file, or all files of a given project. Under 'modmetadata.ts' are a collection of interfaces representing these data types.
Issues/predicted problems