| Summary: | Ant build not triggered on second save | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Darin Swanson <Darin_Swanson> | ||||
| Component: | Ant | Assignee: | Jared Burns <jared_burns> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | john.arthorne | ||||
| Version: | 3.0 | ||||||
| Target Milestone: | 3.0 M2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 2000 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Darin Swanson
Don't even have to use Ctrl-Z. On line 7, remove the ">" Ctrl-S (build is triggered) On line 7, add the ">" (build is not triggered). Turns out the currentTree of BuildManager is null so we cannot retrieve an IResourceDelta using BuildManager.getDelta(IProject) John can you provide some insight here? I've just now read through the history of this through bug 25337 and bug 31510. I don't understand how the fix for those bugs ever worked. The last thing the external tool builder does is: forgetLastBuiltState(); This tells the build manager to throw away the old tree for this builder. For this reason, it will never be able to compute a delta during an incremental build. The reason this was added to the external tool builder is that the build infrastructure has never supported two instances of the same builder on a given project. If two external tool builders are installed, the second one will never be run because the delta will appear to be empty. The full story is in bug 21029. This bug has been around for ever, and turned out to be scary to implement because it requires changes to the format of our single most critical state file on disk, the .tree file (essentially that's where the builder deltas are stored). In thinking about this again this morning, I've thought of another possible solution to this that won't require scary changes. You could take out the "forgetLastBuiltState();" line, thus re-enabling deltas for external tool builders. Then, just build all external tools within one builder. I will attach a patch on ExternalToolBuilder.java 1.20 to show what I mean. Created attachment 5394 [details]
Patch file on ExternalToolBuilder.java
Disclaimer: I haven't tried running the patch, it's just an illustration. In fact, I just realized that you would only want to do that special handling on incremental builds (because it's only on incremental builds that subsequent builders will be skipped). On full builds, all builders will be run anyway. Thanks John for the insights and starting point. Reworked ExternalToolBuilder using John's patch as a starting point. Please verify the changes Jared. Verified. |