Community
Participate
Working Groups
Build Identifier: Problem in org.eclipse.tigerstripe.workbench.internal.api.impl.TigerstripeOssjProjectHandle.getReferencingModels(int) method, which call self recursively for all projects, without checking cycles. Reproducible: Always Steps to Reproduce: 1. Make circular references between the two TS projects. 2. Try rename a entity in any project into workspace(not necessarily in the previous two). Notice: during rename operation you get the stack overflow.
The circular reference should be blocked in step 1. In fact when adding project dependencies, only projects that aren't directly or indirectly dependent on the project should be listed. A safeguard for getReferencingModels(int) might be to throw an error and exit if it ever gets a handle to itself (to at least terminate before causing an infinite loop).
(In reply to comment #1) > The circular reference should be blocked in step 1. It's not trivial to do this in JDT. Circular dependencies can be quite complex and involve many projects. It's not always two projects (that's the simplest case). It's not worth the effort and the amount of changes required to do this. JDT doesn't do it either. It simply warns the user when there is a circular dependency and we should do the same.
I think one of approaches we should detect circular references and report errors(using problem markers) at the stage of change dependencies as it do maven eclipse plugin. But we can continue to work with the project and we can do any operation in artifact manager and it is should not cause any problems(stackoverflow...) if we have circular references.
(In reply to comment #3) > I think one of approaches we should detect circular references and report > errors(using problem markers) at the stage of change dependencies as it do > maven eclipse plugin. But we can continue to work with the project and we can > do any operation in artifact manager and it is should not cause any > problems(stackoverflow...) if we have circular references. Agree. That's exactly how I expect it to behave.
OK with me then. It would be good if the circular reference can be detected when the project is added and not have to wait for a rename or other operation.
Created attachment 190979 [details] 337842.patch Done.
Valentin's patch applied.
I'm still able to reproduce this issue. The StackOverflow error is still logged.
Created attachment 191877 [details] 337842_2.txt Done.
337842_2 patch applied.
Verfieid. Thanks!