EngineHub / EngineHub/WorldEdit

Loading mechanism for optional libs (rhino, etc)

Open
#2,692 0 comments 0 reactions 0 assignees View on GitHub
status:accepted type:tech-debt
Dominant language
Java
Stars
3.5k
Forks
960
Avg merge
6h 57m
Merged PRs (30d)
1

Description

### 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 https://github.com/EngineHub/WorldEdit/issues/2691#issuecomment-2571346375), 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.