Summary: | Changing Package Declarations triggers full project rebuild | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dani Megert <daniel_megert> |
Component: | Core | Assignee: | Kent Johnson <kent_johnson> |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0 | ||
Target Milestone: | 2.1 M2 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Dani Megert
2002-09-20 05:37:50 EDT
Do you have exact steps to reproduce ? A namespace change is quite severe, but it should not recompile the entire project. Now, depending on the scenario, it could simply be a mode which we don't optimize since it doesn't happen very often (how many times have you made such a change for the past year ?). 1. Open a CU 2. Change its package declaration Note: 1) I had auto-build on 2) I copied the CU from another project/package via Navigator (==> error) and then fixed the bug by adapting the package declarartion in the Java Editor Here's the builder trace from the testcase... I don't see a problem. Can you reproduce? Moved file in Navigator: Starting build of Copy Test @ Mon Sep 23 13:34:30 EDT 2002 Found source delta for: Copy Test Clearing last state : State for Copy Test (#5 @ Mon Sep 23 13:32:02 EDT 2002) INCREMENTAL build Compile this added source file D:/aR2.0/workspace.test/Copy Test/p1/X.java Add dependents of added source file p1/X adding dependents of X in p1 Add dependents of removed type p2/X Deleting class file of removed type p2/X About to compile D:/aR2.0/workspace.test/Copy Test/p1/X.java adding dependents of X in p1 Writing new class file X.class Recording new state : State for Copy Test (#6 @ Mon Sep 23 13:34:35 EDT 2002) Finished build of Copy Test @ Mon Sep 23 13:34:35 EDT 2002 Fixed package declaration error: Starting build of Copy Test @ Mon Sep 23 13:35:01 EDT 2002 Found source delta for: Copy Test Clearing last state : State for Copy Test (#6 @ Mon Sep 23 13:34:35 EDT 2002) INCREMENTAL build Compile this changed source file D:/aR2.0/workspace.test/Copy Test/p1/X.java About to compile D:/aR2.0/workspace.test/Copy Test/p1/X.java Writing changed class file X.class Recording new state : State for Copy Test (#7 @ Mon Sep 23 13:34:35 EDT 2002) Finished build of Copy Test @ Mon Sep 23 13:35:01 EDT 2002 Maybe its because I have a large workspace? I'm currently testing how to split org.eclipse.ui. I.e. I created new projects A and B (both being included an re-exported by org.eclipse.ui) and then moved (or copied) stuff to A and B. Changing the package declaration triggered a scrub output location. Sorry are you copying the files between packages or projects? If it is projects... do they have major build failures such as a cycle? If the projects are not building correctly, then they will do full builds on every change. Can you enable the trace so we can see what is happening? I was busy with splitting org.eclipse.ui. Will now try to reproduce. I used the patch you attached to the PR and then tested the File Search dialog page: 1. Enter *.txt as file name pattern 2. Press "Browse..." ==> "*.txt" appears in the others field instead of selecting "*.txt" in the list Oops! message posted to wrong PR - please ignore. I currently can't reproduce the full build behavior either. Maybe this is due to this bug I found: 24172 Strange behavior with wrong package declaration Closing until we have repeatable steps. 24172 is not a bug... the R2.0 Java builder just handles 'incorrect' package declarations differently than the R1.0 builder. |