Community
Participate
Working Groups
Following the instructions on EDT:How to update system parts. I created a edtCompiler.eglar. When I launched EDT I got a builder failure Errors running builder 'EGL Advanced Builder' on project 'ProgramTest'. with the stack trace: java.util.EmptyStackException at java.util.Stack.peek(Stack.java:85) at java.util.Stack.pop(Stack.java:67) at org.eclipse.edt.mof.serialization.Environment.popEnv(Environment.java:33) at org.eclipse.edt.ide.core.internal.lookup.ProjectEnvironmentManager.endBuilding(ProjectEnvironmentManager.java:120) at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.endBuilding(AbstractBuilder.java:90) at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.build(AbstractBuilder.java:158) at org.eclipse.edt.ide.core.internal.builder.Builder.cleanBuild(Builder.java:167) at org.eclipse.edt.ide.core.internal.builder.Builder.build(Builder.java:91) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) I was able to step through and determine the error was caused by the eglar not loading an annotation because an enumeration was missing. You can recreate the scenario by deleting egl.core.restFormatKind. This breaks egl.core.GetRest, but I still have 180 errors. Seems like validation should pick up the missing part and give me additional errors.
This is a separate issue from the defect, but is shown in the stack trace - it's possible for an exception to be thrown before the builder has invoked Environment.pushEnv() in ProjectEnvironmentManager.beginBuilding(), meaning its environment is not pushed, but then it will still invoke Environment.popEnv() in ProjectEnvironmentManager.endBuilding() - causing the EmptyStackException. We can either add a check in endBuilding() to see if we should do a pop, or we can just put that safety net directly in Environment.popEnv() (and PartEnvironment.popEnv()).
I have added a flag to ProjectEnvironmentManager to fix the problem that Justin mentioned. The reason that an error is not thrown during validation for the missing enumeration is because we are getting the enumeration from the systemparts eglar, since the source is missing. I would like to add a step in the instructions on how to modify system parts to say that, before bringing up the IDE, you should delete the edtCompiler.eglar. However, this is not possible at the moment, due to the fact that this eglar is actually used to help bootstrap the compilation of the systemparts. Without this eglar in place, compilation of the system parts in edt.compiler will fail. This will be fixed once the part binders are updated to not hardcode the primitive parts. Until then, you will need to be careful not to delete system parts when editing the egl source in edt.compiler
Looking back at this, I do not think that we will ever be able to compile the system parts if the EGLARs are not present. Because of this, there is no way to prevent someone from deleting the source for a system part and then creating a bad eglar.
won't be fixed