CloudNetService / CloudNet

A modern application that can dynamically and easily deliver Minecraft oriented software

Home Page:https://cloudnetservice.eu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improper shading used within node

RobotHanzo opened this issue · comments

Stacktrace

No response

Actions to reproduce

  1. Open a new project (not inside the original cloudnet project)
  2. Use the driver and node dependency in build.gradle
  3. Try and use a method in driver, browse the source using IDEA
  4. The docstrings and comments are gone, and it uses node jar for the sources instead

CloudNet version

[03.06 23:12:54.195] INFO:
[03.06 23:12:54.195] INFO: CloudNet Blizzard 4.0.0-RC9-SNAPSHOT 1619e68
[03.06 23:12:54.195] INFO: Discord: https://discord.cloudnetservice.eu/
[03.06 23:12:54.195] INFO:
[03.06 23:12:54.195] INFO: ClusterId: 2e8f442a--41f4--861d5dfef0a4
[03.06 23:12:54.195] INFO: NodeId: Node-1
[03.06 23:12:54.195] INFO: Head-NodeId: Node-1
[03.06 23:12:54.195] INFO: CPU usage: (P/S) .16/20.16/100%
[03.06 23:12:54.195] INFO: Node services memory allocation (U/R/M): 11776/11776/63803 MB
[03.06 23:12:54.195] INFO: Threads: 100
[03.06 23:12:54.195] INFO: Heap usage: 62/256MB
[03.06 23:12:54.195] INFO: JVM: Private Build 17 (OpenJDK 64-Bit Server VM 17.0.7+7-Ubuntu-0ubuntu120.04)
[03.06 23:12:54.195] INFO: Update Repo: CloudNetService/launchermeta, Update Branch: nightly
[03.06 23:12:54.195] INFO:

Other

When we use the node dependency
image
When we don't use it
image

A potential solution would be to relocate the dependencies instead of directly shading it with the shadow plugin, to avoid conflicts like this

Issue uniqueness

  • Yes, this issue is unique. There are no similar issues.

Just to add here, relocating sounds like nonsense because then we would have no way to generate correct sources.
The simple but correct (I think) solution should be to just not publish shaded jars and use the original jars for publishing.
If shaded jars are required in the repository, then doing it with a classifier (node-shaded.jar) might be the best solution.
Just +1 for this because it is indeed pretty annoying

Just to put it here: the current gradle setup is pretty fragile anyway (mostly) due to fabric and issues with dependencies that need to be shaded. I will take a look into properly fixing it, but it might take a while - just FYI.