Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350947 - Missing error prevents edtCompiler.eglar from loading
Summary: Missing error prevents edtCompiler.eglar from loading
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Paul Harmon CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-01 10:59 EDT by Joseph Vincens CLA
Modified: 2017-02-23 14:15 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Vincens CLA 2011-07-01 10:59:35 EDT
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.
Comment 1 Justin Spadea CLA 2011-07-06 13:11:30 EDT
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()).
Comment 2 Paul Harmon CLA 2011-07-07 11:34:42 EDT
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
Comment 3 Paul Harmon CLA 2012-06-25 10:32:13 EDT
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.
Comment 4 Joseph Vincens CLA 2012-06-25 10:59:04 EDT
 won't be fixed