| Summary: | Null timestamp on working copy | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Walter Harley <eclipse> |
| Component: | APT | Assignee: | Generic inbox for the JDT-APT component <jdt-apt-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P5 | CC: | eric_jodet |
| Version: | 3.3 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
This is worse than I thought; it is happening even with the workaround in place, in the default condition where reconcile-time processing is enabled. I have a better workaround - now I catch the JavaModelException, delete the working copy, and try again, treating it as if it never existed. This seems to work. This still needs further thought, because it seems to indicate a logical error in the code, but the workaround should be a candidate for M6 because this is otherwise a fairly bad bug. *** Bug 178591 has been marked as a duplicate of this bug. *** Lowering priority to P5 since the workaround appears to be working; no evidence that people are hitting this bug. Reassigning to jdt-apt-inbox, per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Have a workaround at present, should find a more correct and elegant fix. The bug manifests when switching the "enable processing during reconcile" APT setting. If files have been generated and removed during an editing session with reconcile-time processing enabled, and the processing is then disabled, subsequent builds may fail because of null timestamps. It seems that somewhere along the line a working copy (perhaps an empty one) is getting created, but not discarded; then when we attempt to generate types at build time we stumble over that working copy. I'm not sure why it has a null timestamp, but that is apparently used to denote a deleted unit. The workaround is in GeneratedFileManager.saveCompilationUnit(). To see the bug manifest, comment out the following block of code and exercise type generation with and without reconcile-time processing enabled. if (isWorkingCopy && !AptConfig.shouldProcessDuringReconcile(_jProject)) { // Cover the case where the user turned off reconcile-time processing after some working // copies were already created - else they'll get null timestamps and the commit will fail. // There's probably a better way to do this but it's a corner case anyway. - WSH 3/07 _CUHELPER.discardWorkingCopy(unit); isWorkingCopy = false; }