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

Loading mechanism for optional libs (rhino, etc) #2692

Open
wizjany opened this issue Jan 6, 2025 · 0 comments
Open

Loading mechanism for optional libs (rhino, etc) #2692

wizjany opened this issue Jan 6, 2025 · 0 comments
Labels
status:accepted Will be fixed / added to WorldEdit, eventually type:tech-debt Task for cleaning up tech debt that has accumulated in the code base

Comments

@wizjany
Copy link
Collaborator

wizjany commented Jan 6, 2025

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

@wizjany wizjany added status:accepted Will be fixed / added to WorldEdit, eventually type:tech-debt Task for cleaning up tech debt that has accumulated in the code base labels Jan 6, 2025
wizjany added a commit that referenced this issue Jan 6, 2025
…ad point.

Currently, the remapped WorldEdit jar on paper is loaded from a sub-directory of the plugins folder, meaning dependencies like truezip and rhino won't be found in the documented search locations. Adding the parent dir temporarily solves this.

See #2692.
Closes #2691.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:accepted Will be fixed / added to WorldEdit, eventually type:tech-debt Task for cleaning up tech debt that has accumulated in the code base
Projects
None yet
Development

No branches or pull requests

1 participant