Comments (13)
stevefan:
It is not a workaround to disable the CoreMods system. Forge uses the CoreMods system for runtime patching that would be too maintenance-heavy, such as the IExtensibleEnum
system.
The draft PR you linked is the envisioned solution in moving towards Java 15 support, but it will still need to be tested extensively and reviewed to ensure that nothing breaks in all situations (since the picture that LexManos posted in that PR does not indicate any mods are installed).
Would you mind joining the Discord, so we can continue this conversation there?
from coremods.
We know, however Minecraft still targets J8 so that is what we target.
Last time I looked into it, there were external projects ready to go for re-adding JS to the JVM.
So we just need to find one that we can ship IF Mojang ever adopts J15+
from coremods.
Last time I looked into it, there were external projects ready to go for re-adding JS to the JVM.
I guess there's always been Mozilla's Rhino, though according to the original JEP to add Nashorn, "Performance and memory usage of Nashorn applications should be significantly better than Rhino".
Oracle seems to be pushing for people to migrate to GraalVM, so that may well be worth looking into.
from coremods.
It has been in the back of Lex & CPW's mind for as many years as Nashorn has been deprecated. But so long as the vanilla launcher keeps using java8, there isn't much point changing the code.
I'd say, and this is my personal opinion: whenever the active LTS version of java (currently java11) starts being distributed without Nashorn, then it will be when it's worth looking into having options for when the platform's installed java isn't enough to run forge. Any platform should at least support the LTS version of Java, and if they don't, that's their issue, not ours.
from coremods.
Ya, Rhino is one of the options I've looked at. It seems like it'd be fine for our use cases, both license and functionality wise. As well as being a respectable download size. GraalVM isn't quite possible as as I said we have to target what Mojang ships. I need to look into it's native compiler to see if it could make the installer native without being 30MB. But that's a different task.
If someone wants to spend some time, feel free to make a POC of switching to Rhino. However it's not a high priority as we're still years away from Mojang even considering shipping J15+
from coremods.
GraalJS/Truffle are able to be used independent of GraalVM to my knowledge. And it has an option (polyglot.js.nashorn-compat
) that makes it more Nashorn compatible on the JS side.
from coremods.
Figured to post this here if anyone has not seen this https://mail.openjdk.java.net/pipermail/nashorn-dev/2020-October/007557.html
from coremods.
The independent Nashorn project has now been released[1], though note that it requires Java 15 to run.
[1] https://mail.openjdk.java.net/pipermail/nashorn-dev/2020-November/007597.html
from coremods.
I think it's worth noting that I have a fork of Rhino as a mod to power KubeJS (for the same reason, nashorn dying) here: https://www.curseforge.com/minecraft/mc-mods/rhino which has some improvements over original
from coremods.
Maybe we need to consider a short-term transition to Rhino first since Mozilla claims to have added ScriptEngine support in their latest release (as of Jan 2021).
An even simpler workaround is the simply disable CoreMods support if JVM 15 platform detected.
A quick scoop led me here:
CoreMods/src/main/java/net/minecraftforge/coremod/CoreModEngine.java
Lines 48 to 51 in 3817658
This line is also pretty evil:
There's a draft PR that fixes this by building multi-targeting release for Java >=15 and 8 <= Java <= 11. This could be a viable long term solution.
from coremods.
There's already work being done towards getting Forge to run on Java 15, leveraging an existing Nashorn repack which seems to play nice with Java 14 and lower and doesn't waste that many resources being only 2 MBs in size (Source: Twitter).
I doubt a transition towards another scripting engine would benefit both the end user and the developers, due to potential compatibility issues between different implementations that could lead to different features being supported.
from coremods.
@sciwhiz12 I haven't really get into the architecture of Forge just yet...while I just made a few learning mods in Kotlin, I had never been touching the Forge main code.
This could take another week to learn the system...
from coremods.
The Nashorn issue has been resolved in 47918e2
Any other issues would need to be addressed separately, but I haven't encountered any.
from coremods.
Related Issues (20)
- There is no way to remap names
- No way to see the final result of a transform HOT 2
- No way to tell if the coremod is in a developer environment HOT 1
- Cannot instantiate InsnList
- Update ASM to 7
- Include an up to date version of Nashorn HOT 1
- CCE when applying transformers HOT 2
- Printing instruction list for debugging/troubleshooting HOT 12
- Allow remapping class names HOT 3
- Some ASM methods are not usable without access to some Java types HOT 2
- No way to check type of LDC?
- ASMAPI.getSystemPropertyFlag using wrong Boolean conversion HOT 2
- ASMAPI#findFirstInstructionBefore ignores startIndex parameter
- Potential security problem(s) HOT 2
- ClassNode is not on the allowed class list
- Error about fluid flowing block during load on server HOT 4
- Would like a way to create LDC with a float value
- Nashorn exposes java, javax, javafx, com, edu, org packages for scripts by default HOT 7
- loadWithNewGlobal and exit functions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coremods.