Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-core-dev] Differences between a FULL_BUILD and a CLEAN_BUILD


Trying to make sure I understand the expectation on a builder when the different build events are triggered - especially with the changes in this area for 3.0.

I'm want to make sure that I'm not missing something. I've read https://bugs.eclipse.org/bugs/show_bug.cgi?id=53565 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=46039 - as well as a few other reports. I've also done some testing in 2.1 and 3.0 to compare builder behavior.

In 2.1 we did not have a CLEAN_BUILD option, but instead might write a builder that simply said:

    if (kind == IncrementalProjectBuilder.FULL_BUILD) {
      // Full build
      processFull(getProject());

    } else { // build with a delta (Auto/Incremental)

      IResourceDelta delta = getDelta(getProject());
      if (delta != null)
        processDelta(delta);

    }

In my processFull() method I might use an IResourceVisitor or better yet an IResourceProxyVisitor, or possibly some other technique, to find all the resources this builder should process and do the work required. A FULL_BUILD would be triggered when the user used the Rebuild ALL or Rebuild Project menu options in 2.1.

In my processDelta() method I would process any not-null delta to see if any of the accumulated resource changes result in the need to perform build processing.

Based on reading the Javadoc for getDelta(),  it seems appropriate to assume that in the case where an AUTO_BUILD or INCREMENTAL_BUILD is triggered and a null IResourceDelta is returned that processing similar to a FULL_BUILD is required (not shown above). Agreed?

Now in 3.0 if a CLEAN_BUILD request is processed a builder might override the clean() method to forget any build state it has kept, but this is not required per the javadoc.  A CLEAN_BUILD request also results in an AUTO_BUILD build request with a null IResourceDelta. So a builder should run what it may call processFull() whenever a null IResourceDelta is returned or the builder's build state does not exist/null.

What I think I see is that a FULL_BUILD will never be called.  The menu options to do so are gone and I can't seem to find any other way of triggering such a build unless I use the preference setting to bring back the 2.1 build options.  I'm starting to think that performing a Clean... in the UI will be a standard test for builders migrating from 2.1 to 3.0, and that the expectation is that a CLEAN_BUILD request should be equivalent to a 2.1 FULL_BUILD.  If not the builder is broken for 3.0.

Is there a trigger point for starting a FULL_BUILD anymore in 3.0?  My read of https://bugs.eclipse.org/bugs/show_bug.cgi?id=57321 tells me that the UI in M8 is close to complete and the option to add the 2.1 actions back is temporary - they will not be there in the final build of Eclipse 3.0.  Or is there something I've missed in the changes you have made for 3.0 build invocations?


Pat McCarthy  

Back to the top