-
Notifications
You must be signed in to change notification settings - Fork 28
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
Don't assume that all scripts come from GroovyScript #226
Conversation
WTF |
What are you trying to do here? Are you trying to execute scripts from a script or from an addon? DONT DO THIS! It's dangerous and will lead to issues! |
trying to execute scripts from a script or from an addon |
I still stick to my point of view. This mixin of GroovyScript destroys the groovy library, and this PR gives other mods the right to use groovy. In addition, it also makes the following |
I will not support direct usage of |
I didn't make my point clear at all. The effect of this mixin is global, not just GroovyScript scripts. |
That doesnt change anything. The direct use of |
IntroductionI want to repeat my thoughts in a short session. GroovyScript should not assume that the user of groovy has and only has GroovyScript. // status quo:
public static Class<?> compile(GroovyClassLoader loader, String name, String text){
if(Loader.isLoaded("groovyscript")) return loader.paresClass(text, GroovyScript.getScriptPath() + '/' + name);
else return loader.paresClass(text, name);
} This pr can cancel the above method so that GroovyScript does not need to be considered. misunderstanding
ResultIn the current situation, I completely think this is a design flaw. To prove it, I might try making a mod (in other uses) that uses Groovy but doesn't depend on GroovyScript. |
Now I understand. I will reconsider this pr
I just never considered someone else using the groovy lib |
Implemented in #235 because reasons |
Don't assume that all scripts come from GroovyScript.
This mixin breaks other mods' use of groovy, and scripts not from the groovyscript path do not work as expected.
The following example does not work in a GroovyScript environment.