WorldEdit

WorldEdit

45M Downloads

Loading mechanism for optional libs (rhino, etc)

wizjany opened this issue ยท 0 comments

commented

The Problem

Optional dependencies, such as truezip, truevfs, and the rhino runtime, are clunky to install for users and don't have platform parity or consistency at the moment.

Currently:

  • Rhino is shadowed into the neoforge (and thus the combined -mod) jar, but not into the bukkit distribution.
  • Truezip/truevfs aren't included anywhere and must be manually installed.
  • Installation/loading is done by manually adding a jar to a folder which is referenced by our classpath entry in the jar manifest file.

A Solution

Platform-parity: We shouldn't require different installations for bukkit and modded platforms.
User-friendliness: We should either use automated library loading features (exists on spigot/paper, might need to rig something up on mod platforms?) or shadow the libraries (but this causes bloat, especially for things very rarely used).

In theory, we can continue to bundle for NF/Fabric and use the library loader for Spigot/Paper for rhino to avoid increasing the bukkit jar size, but this would only help for rhino.

One more thing to note is that Paper does allow loading libraries at runtime (see #2691 (comment)), so when we drop spigot support that would also allow better control over library loading, as opposed to loading all optional libs even when unused.

Alternatives

No response

Anything Else?

No response