Target of interest: https://github.com/source-academy/frontend/blob/master/src/commons/utils/JavaHelper.ts
All java-slang backend logic should be moved here.
The present implementation here implements logic that should be handled in java-slang entirely. Examples include running the type checker; I see no reason why the frontend needs to know that a type checker is being run, much less be the one to actually run it.
My suggestion is to move all of the backend logic back into java-slang and only expose a minimal interface that lets the frontend pipe in code along with execution options (e.g. execution by compilation/JVM or by CSEC machine) and all necessary IO callbacks (presently only stdout and stderr).
Target of interest: https://github.com/source-academy/frontend/blob/master/src/commons/utils/JavaHelper.ts
All java-slang backend logic should be moved here.
The present implementation here implements logic that should be handled in
java-slangentirely. Examples include running the type checker; I see no reason why the frontend needs to know that a type checker is being run, much less be the one to actually run it.My suggestion is to move all of the backend logic back into
java-slangand only expose a minimal interface that lets the frontend pipe in code along with execution options (e.g. execution by compilation/JVM or by CSEC machine) and all necessary IO callbacks (presently onlystdoutandstderr).