Bug 8667

Summary: Circular dependencies break compilation
Product: [Eclipse Project] Platform Reporter: Daniel Berg <danberg>
Component: ResourcesAssignee: DJ Houghton <dj.houghton>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: paulacox, philippe_mulet, schacher
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Daniel Berg CLA 2002-01-29 08:57:39 EST
This was reported by a customer and I feel that it is a low priority.
The problem is that they have project A that has project B on its build path 
and project B has project A on its build path as well.  When a build is 
performed an UnsupportedOperationException is thrown by the BuildAction.  

This is not very smart by the user but a nice error message would be 
appreciated.
Comment 1 Philipe Mulet CLA 2002-01-29 10:28:54 EST
Agreed, the build manager should break the cycle and proceed building ?

Moving to Plaform/Core for comment.
Comment 2 John Arthorne CLA 2002-01-29 10:57:50 EST
This scenario works fine in both 1.0 and 2.0 stream.  I'm not aware of any 
constraint in the build manager that would prevent this (since we're not aware 
of the build path).  In any case this shouldn't cause an exception since 
circular dependencies are perfectly valid.

The example I tried:

Project P1 depends on P2 and contains:

public class A {
   B b;
}

Project P2 depends on P1 and contains:

public class B extends A {
}

Closing bug, please reopen if you have further information or a reproducible 
case.
Comment 3 Ritchie Schacher CLA 2002-02-25 14:35:20 EST
The way to reproduce this, using your test, is to select p1 and p2, and from the 
context menu, select "build project".

It does not fail when doing a rebuild all or building the projects one-at-a-time 
.

This could be a problem for very large, complex applications, as rebuild all 
could get expensive and one-at-a-time could be tedious.
Comment 4 John Arthorne CLA 2002-03-07 11:20:49 EST

*** This bug has been marked as a duplicate of 10262 ***