CIF and Chi simulators crash when using ECJ as Java compiler
Simulate and empty .cif
file and select Compiler -> Java Compiler -> Eclipse Compiler for Java (ecj). Simulation crashes. The crash report indicates:
[Exception]
java.lang.RuntimeException: Compilation error.
at org.eclipse.escet.cif.simulator.compiler.CifCompilerContext.compile(CifCompilerContext.java:1531)
at org.eclipse.escet.cif.simulator.compiler.CifCompiler.compileSpec(CifCompiler.java:115)
at org.eclipse.escet.cif.simulator.compiler.CifCompiler.compileSpec(CifCompiler.java:63)
at org.eclipse.escet.cif.simulator.CifSimulator.loadSpec(CifSimulator.java:475)
at org.eclipse.escet.cif.simulator.CifSimulator.simulateInternal(CifSimulator.java:216)
at org.eclipse.escet.cif.simulator.CifSimulator.simulate(CifSimulator.java:115)
at org.eclipse.escet.cif.simulator.CifSimulatorApp.runInternal(CifSimulatorApp.java:129)
at org.eclipse.escet.common.app.framework.Application.run(Application.java:343)
at org.eclipse.escet.common.app.framework.Application.run(Application.java:183)
at org.eclipse.escet.common.eclipse.ui.BaseFileCommandHandler.run(BaseFileCommandHandler.java:261)
at org.eclipse.escet.common.eclipse.ui.BaseFileCommandHandler$1.run(BaseFileCommandHandler.java:102)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.eclipse.escet.common.app.framework.javacompiler.RuntimeJavaCompilerException: Run-time Java code compilation failed (with 14 source files):
with output (40):
File cifcode/Event_tau.java is missing
with diagnostics (1):
line 0, column 0: ERROR: java.lang.IllegalArgumentException: File cifcode/Event_tau.java is missing
at org.eclipse.escet.common.app.framework.javacompiler.RuntimeJavaCompiler.compile(RuntimeJavaCompiler.java:187)
at org.eclipse.escet.cif.simulator.compiler.CifCompilerContext.compile(CifCompilerContext.java:1529)
... 11 more
Steps to consider:
- Update versions of
org.eclipse.jdt.compiler.tool
in POMs and elsewhere. - Fix Eclipse Java Compiler runtime in-memory compilation in application framework.
- Remove
@Ignore
for unit tests for in-memory compilation inorg.eclipse.escet.common.app.framework.tests
project, and ensure these tests work again. Switch default for Chi and CIF back to Eclipse Java Compiler.Update documentation to reflect new defaults.