Community
Participate
Working Groups
JS generation will throw a stack overflow when compiling the following: externaltype romulus type JavaScriptObject field1 remus; end externaltype remus type JavaScriptObject field2 romulus; end handler Handy type RUIhandler{} myET romulus; function start() end end The root of this problem is EGLClassTemplate.genLoadScript4DependentParts(). This method recursively itself for referenced ExternalTypes. Since the ETs refer to each other, it goes into an infinite loop.
This is still happening on 201111210901's build, but I'm hoping the ET refering to each other is less likely case for end user. Defering
Created attachment 208588 [details] Fix
The problem happens when getting the dependent external files. Tony has implement a method in HTMLGen getDependencyList which must use ISystemEnvironment. In this fix, I keep using the "egl" and "eglx" to filter out the system part. We may need to change to the IRUtils.isSystemPart method which need to transfer the ISystemEnvironment for the js generator.
We do not support circular reference. Check the discuss in bug 373995
I am closing this, since it appears to work now. This was not an invalid problem, however. bug 373995 refers to circular dependencies in handlers, which must be instantiated This bug deals with external types. There is nothing invalid about cirucular references in ETs, this happens all the time in java (and JS)