Closed EpiCanard closed 3 years ago
Hello there.
The reason I upgraded to Java 11 was so that I could use [InputStream#readAllBytes()](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html#readAllBytes()) which got added in Java 9. It is used by the classbytes transformation system which makes the event api work so nicely.
While it is possible to achieve the same functionality on Java 8, it may perform worse. Rolling back to an older version of ScalaLoader will work, but you won't be able to use the event api, and the bukkit pluginloader classybytes transformations won't be applied either.
I can look into creating a multi-release jar that will work on both Java 8 and 11 to really solve the issue. It will then pick the more effecient method on Java 11. I don't want Java 11 users to take the performance hit that is required for Java 8 users.
I am currently working on providing a better api for ConfigurationSerializable classes, but when that's done then the multi-release jar will be the first item on my todo-list. (A pull request would be very welcome too!)
PS. I wasn't actually expecting people to use Java 8 anymore; You can have a look at this video to hear some reasons why you would want to upgrade to 11 or 15: Panel: Ask the Java Architects
PPS. I should also mention that somebody else has forked the project to make it run on Java 8 again: 8-bit-gaming/ScalaPluginLoader
Edit: I should also mention that I will not support Java 8 indefinitely. Once the java compiler drops support for --release 8, or ASM or Scala drop supprt for Java 8, then I will too.
Hello,
Don't waste time creating a version of ScalaPluginLoader compatible with Java 8. Your changes are justified.
If I asked you, it's to avoid forcing users of my plugin to use Java 11 or higher. But if downgrading the ScalaPluginLoader to java 8 means reducing its quality and performance, upgrade to java 11 (or higher) is a cost that can be taken :) And if users don't want to use java 11 they can still use the old version of my plugin (developed in java).
Thanks for you answer. That's all for me :)
Alright thank you. I won't putting any effort into Java 8 compability then any time soon. I think the best lesson to take from this is "don't make assumptions, measure" so I might include the bStats library by the time of the next release.
@Jannyboy11 To give you an idea of why I'm worried about migrating them to java 11. https://bstats.org/global/bukkit#javaVersion You can see the distribution of the java version used for minecraft servers and there is a large part of java 8.
It is such a shame that so many people are still on such an inferior version of Java. Oh well - time to reopen the issue then.
I agree...
Hi, I know this thread has been inactive for a while, so here's a little update. My current development code now compiles again with --release 8
. There's just some bugs in the implementation for the new configurationseralization api so those need to be ironed out first. I expect to release the new version somewhere at the end of the month.
Hello, Thank you for the news. Good luck with the fix of the serialization.
As of 8a8ad424 ScalaLoader supports Java 8 again. The archive file is now a Multi-Release jar, so that it can pick better implementations of certain classes when running on Java 11 or newer. I won't deploy to SpigotMC yet because there are still three parts missing to the enhanced configuration-serializatoin api (support for sum types, arrays and some collections, and scala standard library classes)
Edit: At https://bstats.org/plugin/bukkit/ScalaLoader/9150 you will now be able to see which versions of Java and Scala are most used by servers running ScalaLoader.
Thanks a lot for your work :)
I decided to release on SpigotMC again because one of the three missing features of configuration serialization api is now implemented, and a new version of Scala was released. I won't be completing the other two features anytime soon due to some real life issues. Read the update notes here.
Thank you. No problem :) Good luck for your life issues.
Hello,
Issue type: Bug Minecraft version : Spigot 1.16.3 ScalaLoader version : 0.13.7
Description :
In the commit b6891a27 you changed the java version used for compilation from 8 to 11.
This change prevent to use your plugin with java below the version 11 (like java 8), many servers still use java 8 and it could be a good idea to keep the compatibility with java 8. When I try to load ScalaLoader inside server launched with java 8 I get this error.
Is this change mandatory ? If not, is it possible to rollback to java 8 version ?
Best Regards