Bug 12921 - Build sometimes builds files that have not changed
Summary: Build sometimes builds files that have not changed
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 13029 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-05 19:09 EST by OTI Support CLA
Modified: 2002-05-14 08:56 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description OTI Support CLA 2002-04-05 19:09:10 EST
Reporter to follow up with more information.
Comment 1 Philipe Mulet CLA 2002-04-08 07:15:45 EDT
The incremental builder is responsible for recompiling all files which it 
thinks may be affected by a change in a prerequisite. 

If a file has structural changes (addition of members, change in any of its 
signatures, ...), then all its dependents are recompiled. Dependents are found 
amongst files which have package name and simple name dependencies.
Comment 2 Philipe Mulet CLA 2002-04-09 13:09:43 EDT
*** Bug 13029 has been marked as a duplicate of this bug. ***
Comment 3 Kent Johnson CLA 2002-04-12 11:26:53 EDT
So? Is there more to come?
Comment 4 Kent Johnson CLA 2002-04-16 10:22:12 EDT
Closing this PR. Reopen if you are provided with repeatable steps.
Comment 5 OTI Support CLA 2002-04-17 19:59:52 EDT
I have a testcase but it was determined that the reason the extra building
was occurring was because their was a circular reference in the customer
project dependencies.

Closing.
Comment 6 OTI Support CLA 2002-04-22 21:07:04 EDT
Originator confused.   Testcase has been provided.
Will update with location of testcase.
Comment 7 OTI Support CLA 2002-04-24 13:53:24 EDT
The testcase has been placed on the ott7f phoenix archive under 12921.
Please see the readme.txt for steps to reproduce.
Comment 8 Kent Johnson CLA 2002-05-02 12:39:20 EDT
In the 2.0 stream, only when actual deltas exist for a dependent project is its 
builder invoked. When cycles exist, the next incremental build will see deltas 
generated in the previous build... but unless further class files change, no 
more deltas will result & thus no more incremental builds. Obviously the better 
solution is to remove the cycles in the first place.

So with a simple case of 2 projects that form a cycle, here's the trace when I 
make significant changes to source files:

Full Build:
Starting build of P1 @ Thu Apr 25 13:41:32 EDT 2002
FULL build
About to compile D:/aM5/workspace.test/P1/src/p1/A.java
Writing class file A.class
About to read state...
Successfully read state for P2
Finished build of P1 @ Thu Apr 25 13:41:34 EDT 2002

Starting build of P2 @ Thu Apr 25 13:41:34 EDT 2002
FULL build
About to compile D:/aM5/workspace.test/P2/src/p2/B.java
Writing class file B.class
Finished build of P2 @ Thu Apr 25 13:41:34 EDT 2002

Forced Incremental Build:
Starting build of P1 @ Thu Apr 25 13:41:39 EDT 2002
INCREMENTAL build
Add dependents of changed class file D:p2/B
  adding dependents of B in p2
Finished build of P1 @ Thu Apr 25 13:41:39 EDT 2002
No reason to build P2 since it has seen all the deltas from its dependent 
projects

ANY OTHER INCREMENTAL BUILDS DO NOTHING...

Add a field to a source file in P1:
Starting build of P1 @ Thu Apr 25 13:41:51 EDT 2002
INCREMENTAL build
Compile this changed source file D:/aM5/workspace.test/P1/src/p1/A.java
About to compile D:/aM5/workspace.test/P1/src/p1/A.java
Type has structural changes p1/A
  adding dependents of A in p1
Writing class file A.class
Finished build of P1 @ Thu Apr 25 13:41:51 EDT 2002

Starting build of P2 @ Thu Apr 25 13:41:51 EDT 2002
INCREMENTAL build
Add dependents of changed class file D:p1/A
  adding dependents of A in p1
Finished build of P2 @ Thu Apr 25 13:41:51 EDT 2002

ANY OTHER INCREMENTAL BUILDS DO NOTHING...

Add a field to a source file in P2:
Starting build of P1 @ Thu Apr 25 13:42:11 EDT 2002
INCREMENTAL build
Finished build of P1 @ Thu Apr 25 13:42:11 EDT 2002

Starting build of P2 @ Thu Apr 25 13:42:11 EDT 2002
INCREMENTAL build
Compile this changed source file D:/aM5/workspace.test/P2/src/p2/B.java
About to compile D:/aM5/workspace.test/P2/src/p2/B.java
Type has structural changes p2/B
  adding dependents of B in p2
Writing class file B.class
Finished build of P2 @ Thu Apr 25 13:42:11 EDT 2002

Forced Incremental Build:
Starting build of P1 @ Thu Apr 25 13:42:16 EDT 2002
INCREMENTAL build
Add dependents of changed class file D:p2/B
  adding dependents of B in p2
Finished build of P1 @ Thu Apr 25 13:42:16 EDT 2002
No reason to build P2 since it has seen all the deltas from its dependent 
projects

ANY OTHER INCREMENTAL BUILDS DO NOTHING