Bug 18983 - Replacing binary project doesn't trigger build
Summary: Replacing binary project doesn't trigger build
Status: VERIFIED FIXED
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 F3   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-04 05:59 EDT by Dirk Baeumer CLA
Modified: 2002-06-10 15:57 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 Dirk Baeumer CLA 2002-06-04 05:59:08 EDT
F2

- create workspace with binary project
- create source project which references binary projects
- now replace binary project with previous version
  observe: no build of source project happens
Comment 1 Dejan Glozic CLA 2002-06-04 10:43:34 EDT
This must be the result of the recent changes in the builder - the builder may 
be too aggressive in optimization.
Comment 2 Philipe Mulet CLA 2002-06-05 05:29:10 EDT
Pls investigate. In the case the JAR is being changed, a delta should have 
occurred and we should not be smart in this case.

Also, we may want to store the timestamp for an external JAR so as to detect a 
change in it (after user has forced a manual refresh). See 
DeltaProcessor#getTimeStamp(File).
Comment 3 Kent Johnson CLA 2002-06-05 11:26:57 EDT
Dirk: Need more info...

I tried with a workspace that has org.eclipse.jdt.core as source and everything 
else as binary. Replacing org.eclipse.core.runtime with a previous version did 
generate a delta on its jar file & as a result a full build of jdt.core.

What was in your binary project?

If it only has an external jar file then no builds will happen, since deltas 
are not generated for changes to external jars.
Comment 4 Dirk Baeumer CLA 2002-06-05 11:50:35 EDT
My test case is as follows:

- autobuild off
- eclipse devel workspace with JDT, Search, Compare and Debug in source
- replaced org.eclipse.core.resources with a version from a previous
  drop
- pressed Ctrl+B for build <== sorry forgot to mention
  observe: no build happens.
Comment 5 Kent Johnson CLA 2002-06-05 12:40:47 EDT
Tried to reproduce but a full build definitely happens for each source 
project...

Dirk: When you hit Ctrl-B, do you not even see a progress dialog?

If so then that would be the core BuildManager which doesn't believe there is 
anything to build.
Comment 6 Dirk Baeumer CLA 2002-06-06 03:24:46 EDT
I see a progress dialog saying that build information is restored. But none of 
the projects I have in source (e.g. org.eclipse.jdt.ui) get rebuild.
Comment 7 Kent Johnson CLA 2002-06-06 14:58:29 EDT
Dirk: Can you please include more info because of 
http://dev.eclipse.org/bugs/show_bug.cgi?id=19465

I need to know exactly what binary & source projects you're adding AND from 
where... can you also include the .classpath files of 
org.eclipse.core.resources and one of the source projects (before & after).
Comment 8 Dirk Baeumer CLA 2002-06-07 07:46:11 EDT
Ecnlose my workspace setup. Hope it helps

org.apache.ant [binary]
org.apache.lucene [binary]
org.apache.xerces [binary]
org.eclipse.ant.core  [binary]
org.eclipse.compare
org.eclipse.core.boot  [binary]
org.eclipse.core.resources  [binary]
org.eclipse.core.resources.win32  [binary]
org.eclipse.core.runtime  [binary]
org.eclipse.debug.core
org.eclipse.debug.ui
org.eclipse.help  [binary]
org.eclipse.jdt.core  [binary]
org.eclipse.jdt.debug
org.eclipse.jdt.debug.ui
org.eclipse.jdt.junit
org.eclipse.jdt.launching
org.eclipse.jdt.launching.j9
org.eclipse.jdt.ui
org.eclipse.jdt.ui.examples.projects
org.eclipse.jdt.ui.tests
org.eclipse.jdt.ui.tests.refactoring
org.eclipse.pde.junit
org.eclipse.sdk  [binary]
org.eclipse.search
org.eclipse.swt  [binary]
org.eclipse.swt.win32  [binary]
org.eclipse.team.core  [binary]
org.eclipse.ui  [binary]
org.eclipse.ui.win32  [binary]
org.eclipse.update.core  [binary]
org.eclipse.update.core.win32  [binary]
org.eclipse.webdav  [binary]
org.junit  [binary]

All source projects are form dev.eclipse.org.  The binary projects are from the 
F2 build. I imported them using PDE from my eclipse installation. I replace 
org.eclipse.code.resources with a version from F1. Both eclipse version are 
install on my disk (e.g. d:\apps\eclipse and d:\apps\eclipse.old).

Here is the .classpath file from org.eclipse.jdt.ui

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="ui"/>
    <classpathentry kind="src" path="ui refactoring"/>
    <classpathentry kind="src" path="core refactoring"/>
    <classpathentry kind="src" path="core extension"/>
    <classpathentry kind="src" path="/org.eclipse.jdt.core"/>
    <classpathentry kind="src" path="/org.eclipse.jdt.debug"/>
    <classpathentry kind="src" path="/org.eclipse.jdt.launching"/>
    <classpathentry kind="src" path="/org.eclipse.debug.ui"/>
    <classpathentry kind="src" path="/org.eclipse.debug.core"/>
    <classpathentry kind="src" path="/org.eclipse.ui"/>
    <classpathentry kind="src" path="/org.eclipse.compare"/>
    <classpathentry kind="src" path="/org.eclipse.search"/>
    <classpathentry kind="src" path="/org.eclipse.core.resources"/>
    <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
    <classpathentry kind="src" path="/org.eclipse.core.boot"/>
    <classpathentry kind="src" path="/org.apache.xerces"/>
    <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" 
sourcepath="JRE_SRC"/>
    <classpathentry kind="src" path="/org.eclipse.help"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

And the one from org.eclipse.core.resources.

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry exported="true" kind="lib" path="resources.jar"
        rootpath="" sourcepath="/org.eclipse.core.resources/resourcessrc.zip"/>
    <classpathentry kind="src" path="/org.apache.xerces"/>
    <classpathentry kind="src" path="/org.eclipse.ant.core"/>
    <classpathentry kind="src" path="/org.eclipse.core.boot"/>
    <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
    <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" 
sourcepath="JRE_SRC"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

Comment 9 Kent Johnson CLA 2002-06-07 13:37:09 EDT
I have a simpler case... start with a new empty workspace and import the 15 
required projects for org.eclipse.search as binary projects from the default 
location, then import org.eclipse.search as a source project.

Now replace org.eclipse.core.resources with the version from the F1. The 
project was deleted and added back but there are no deltas.
Comment 10 Philipe Mulet CLA 2002-06-09 09:02:58 EDT
Kent, please review the proposed fix (DeltaProcessor).
Comment 11 Kent Johnson CLA 2002-06-10 13:31:59 EDT
The DeltaProcessor fix did the trick for the smaller testcase.