-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Problems and suggestions on dependency management #412
Comments
Hi @Shinnvy, thanks for your issue.
Currently litecommands doesn't include any files from own dependencies. You can checkout it by downloading jar from maven repository: https://repo.panda-lang.org/#/releases/dev/rollczi/litecommands-core/3.4.2 But LiteCommands mark required dependencies as You can exclude
You're right, I can remove
This depend on your platform e.g. for JDA or plugin paper (with isolated classloader) you don't need relocation, but in other cases you need.
Unfortunately, LiteCommands doesn't have good docs :/ |
Hi @Rollczi ! |
* Remove panda stk and expiringmap * Downgrade java to 11 for JDA. * Bump minestom example to java 21. * Bump minestom example dependency. * Update Minestom Change repository and update Minestom to J21 * Fix merge --------- Co-authored-by: KermanIsPretty <46640204+KermanIsPretty@users.noreply.github.com>
I have been using LiteCommands in my project and noticed a few areas where the dependency management could potentially be optimized. I hope you don't mind me bringing this up, as I believe these optimizations could benefit both LiteCommands and projects that depend on it.
org.jetbrains:annotations
I observed that LiteCommands uses
api("org.jetbrains:annotations:24.0.1")
in its Gradle build file. This maybe causesorg.jetbrains:annotations
to be included in the final JAR (I'm not sure), which in turn means that projects depending on LiteCommands also include this dependency. In my case, since my project is built with Maven, I had to manually addorg.jetbrains:annotations
as a dependency with thecompile
scope to prevent it from being packaged into a jar.org.panda-lang:expressible
Additionally, I noticed that LiteCommands only uses a few classes from
org.panda-lang:expressible
, specificallyLazy
,Result
, andOption
. SinceOption
can be replaced byjava.util.Optional
, and the other two classes seem to have straightforward implementations, I wonder if there is a specific reason why the entireorg.panda-lang:expressible
library is included. Evaluate whether the entireorg.panda-lang:expressible
library is necessary or if the specific classes (Lazy, Result, Option) can be extracted or reimplemented within LiteCommands. This would reduce the dependency footprint and make LiteCommands more lightweight.Does this mean that, when I use LiteCommands, need to be repeated to add
org. Jetbrains: annotations
and set tocompile
to avoid packaging. Also, I need to relocateLiteCommands
,panda.std
, andnet.joda.expiringmap
, right? There seems to be no explanation on this in the document. If so, this seems to be something that can be optimized. Will the author consider this?Thank you!
The text was updated successfully, but these errors were encountered: