| Summary: | Stack overflow during refactoring operation if any TS projects have circular references | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Technology] Tigerstripe | Reporter: | Valentin Yerastov <valentin> | ||||||
| Component: | Core | Assignee: | Project Inbox <tigerstripe.core-inbox> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | chrhartl, nmehrega, yuri | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 0.5M0 | ||||||||
| Hardware: | PC | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Valentin Yerastov
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! |