Bug 296825 - Unexpected *.class delta from a Javadoc change
Summary: Unexpected *.class delta from a Javadoc change
Status: RESOLVED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 3.6 M5   Edit
Assignee: PDE API Tools Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2009-12-03 11:19 EST by Michael Rennie CLA
Modified: 2010-01-20 14:30 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2009-12-03 11:19:13 EST
I20091201-1600

Running some builder tests Darin and I noticed that making a Javadoc change to the class Launch from debug.core was showing our builder doing compatibility checks on the class when it should be a no-op. 

Stepping through our builder I found out that we are actually getting a delta for Launch.class when the only change made was to Javadoc. Talking with Olivier this never happen since Javadoc is never stored in class files.
Comment 1 Olivier Thomann CLA 2009-12-03 11:20:40 EST
I'll investigate why the java builder writes the .class file in this case.
Comment 2 Michael Rennie CLA 2009-12-03 11:37:49 EST
Steps:

1. get org.eclipse.debug.core from HEAD
2. open Launch.java
3. add a @noextend tag to the class and save
Comment 3 Markus Keller CLA 2009-12-03 11:40:03 EST
Javadoc affects the .class file when a @deprecated tag is added or removed. Also line number attributes may need to be rewritten.
Comment 4 Olivier Thomann CLA 2009-12-03 12:02:59 EST
(In reply to comment #3)
> Javadoc affects the .class file when a @deprecated tag is added or removed.
Right. This is affecting the modifiers of the corresponding type.

> Also line number attributes may need to be rewritten.
This should not be a structural change.
Comment 5 Olivier Thomann CLA 2009-12-03 12:16:05 EST
In fact this is normal.
As Markus said, the line number attributes might be different, so the .class file needs to be saved in order to enable debugging on it. But since there is no structural changes, the dependents are not recompiled.
So this is the expected behavior.
The problem in this case is that we don't know anymore in the API Tooling builder was the modification can be. So we process the corresponding type again.
Comment 6 Olivier Thomann CLA 2009-12-03 12:30:54 EST
I confirm. The .class file delta comes from the class file that has different line number attributes.
No dependent types are recompiled as this is not a structural change.

The only way the API Tooling builder can find out that this doesn't need to reprocess the corresponding type is to add headers information for each type into the API Tooling build state.

This might end up being slower than simply processing the type.
Comment 7 Michael Rennie CLA 2009-12-03 13:44:42 EST
(In reply to comment #6)
> The only way the API Tooling builder can find out that this doesn't need to
> reprocess the corresponding type is to add headers information for each type
> into the API Tooling build state.
> 
> This might end up being slower than simply processing the type.

Moving to M5 then, we can examine the pros/cons of trying to detect change types.
Comment 8 Michael Rennie CLA 2010-01-20 14:30:23 EST
marking as wontfix, to accurately compute that a class file has structurally changed would never work for the incremental build case.