md-5 / SpecialSource

Automatic generator and renamer of jar obfuscation mappings.
Other
202 stars 51 forks source link

Dependencies with remapped source are unable to be depended on cleanly. #69

Open GBroad opened 3 years ago

GBroad commented 3 years ago

Take two plugins, A and B.

Both A and B depend on a mojang mapped spigot. B depends on A.

When building A and remapping, all is fine.

But when B depends on A, A's pom still uses the remapped NMS, but of course, since A's source now uses obfuscated NMS, it can't build properly. Using certain methods (which use NMS) from A leads to a build error for B, looking like: "Cannot access class:".

SpecialSource could:

Currently, I have to import the obfuscated nms as well, which leads back to: "This isn't ideal as now you're working with two versions of NMS in your IDE when working on B, one of which is wrong."

md-5 commented 3 years ago

Build a mojang mapped version also (Non-remapped, if you will) for any plugins that depend on it.

It already does... the original jar.

GBroad commented 3 years ago

Build a mojang mapped version also (Non-remapped, if you will) for any plugins that depend on it.

It already does... the original jar.

Not installed to .m2 though, so not very useful unless I run another script in tandem. If there's a way to edit the pom so this is installed locally, I'd love to know about that.

Plus, I'm unsure if you'd consider this a good fix, as it only applies to dependencies we have control over.