Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336632 - Bad error "The superclass hierarchy for [..].JdtApt has been reduced"
Summary: Bad error "The superclass hierarchy for [..].JdtApt has been reduced"
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 11:04 EST by Markus Keller CLA
Modified: 2011-03-31 14:24 EDT (History)
3 users (show)

See Also:
Michael_Rennie: review+


Attachments
Project set (375 bytes, text/plain)
2011-02-08 11:04 EST, Markus Keller CLA
no flags Details
Proposed fix (5.61 KB, patch)
2011-03-30 10:05 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2011-02-08 11:04:45 EST
Created attachment 188529 [details]
Project set

N20110207-2000

- new workspace
- import attached project set
- set API Baseline to 3.6.1
=> no API tools problems (good)

- replace org.apache.ant with branch v1_8_2
=> Wrong API Tools error: "The superclass hierarchy for org.eclipse.jdt.apt.core.build.JdtApt has been reduced"
Comment 1 Markus Keller CLA 2011-03-10 11:18:34 EST
Ping?

Running with I20110309-1800, I now have the following wrong errors in my workspace, and I have no idea how to get rid of them:

The major version should be incremented in version 3.5.100.qualifier, since API breakage occurred since version 3.5.0.v20100526	MANIFEST.MF	/org.eclipse.ui.console/META-INF	line 5	Version Numbering Problem

The super interfaces set has been reduced for type org.eclipse.ui.console.IOConsoleInputStream	IOConsoleInputStream.java	/org.eclipse.ui.console/src/org/eclipse/ui/console	line 29	Compatibility Problem

The super interfaces set has been reduced for type org.eclipse.ui.console.IOConsoleOutputStream	IOConsoleOutputStream.java	/org.eclipse.ui.console/src/org/eclipse/ui/console	line 36	Compatibility Problem

The super interfaces set has been reduced for type org.eclipse.ui.console.MessageConsoleStream	MessageConsoleStream.java	/org.eclipse.ui.console/src/org/eclipse/ui/console	line 35	Compatibility Problem


When I removed my API baseline (3.6.1), waited for the build, added a new baseline (3.6.2), and waited for the build again, then I even got an additional problem of the same kind:

The major version should be incremented in version 3.7.0.qualifier, since API breakage occurred since version 3.6.2.R36x_v20110210	MANIFEST.MF	/org.eclipse.osgi/META-INF	line 78	Version Numbering Problem

The super interfaces set has been reduced for type org.eclipse.osgi.storagemanager.ManagedOutputStream	ManagedOutputStream.java	/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager	line 26	Compatibility Problem
Comment 2 Markus Keller CLA 2011-03-23 14:33:40 EDT
Ping. This is really annoying, since the wrong API tools errors are polluting my Problems view.

BTW: After comment 1, you can easily hide/show the bogus problems by closing/opening the org.apache.ant project in the workspace.
Comment 3 Olivier Thomann CLA 2011-03-23 17:24:57 EDT
Ok, I'll take a look.
Comment 4 Olivier Thomann CLA 2011-03-29 13:09:24 EDT
It looks like this is coming from a bogus api description for the org.apache.ant project once replaced with the version 1.8.2. I am investigating.

The superclass of org.eclipse.jdt.apt.core.build.JdtApt is reported with a private visibility so the whole superclass hierarchy is reported as empty and this is causing the error.

If I remove the api description file, the next time it is computed, it looks good. So the problem might come from the replacement of the api description after the org.apache.ant project is replaced with the new version.
Comment 5 Olivier Thomann CLA 2011-03-30 10:05:31 EDT
Created attachment 192191 [details]
Proposed fix

Michael, please review.
Comment 6 Olivier Thomann CLA 2011-03-30 10:11:16 EDT
The api description was flushed only for api tools projects. In this case, org.apache.ant is not an api tools project. It is a simple java project, but it has an api description.
The patch makes sure that in this case its api description is flushed when the project is removed (replaced with a newer version).
Comment 7 Michael Rennie CLA 2011-03-30 16:46:41 EDT
(In reply to comment #6)
> The api description was flushed only for api tools projects. In this case,
> org.apache.ant is not an api tools project. It is a simple java project, but it
> has an api description.
> The patch makes sure that in this case its api description is flushed when the
> project is removed (replaced with a newer version).

I managed to still get the problem using the following steps:

1. new workspace
2. check out org.apache.ant 1.6.5
3. set baseline to 3.6.1
4. check out org.eclipse.jdt.apt.core

After the build completed I had the following errors:

Description	Resource	Path	Location	Type
The major version should be incremented in version 3.3.500.qualifier, since API breakage occurred since version 3.3.401.R36_v20100727-0110	MANIFEST.MF	/org.eclipse.jdt.apt.core/META-INF	line 5	Version Numbering Problem

The super interfaces set has been reduced for type org.eclipse.jdt.apt.core.build.JdtApt	JdtApt.java	/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/build	line 35	Compatibility Problem

Replacing the version of Ant with 1.8.2 did not make the error go away, I had to clean the entire workspace to make the problems go away.
Comment 8 Olivier Thomann CLA 2011-03-31 12:11:00 EDT
(In reply to comment #7)
> Description    Resource    Path    Location    Type
> The major version should be incremented in version 3.3.500.qualifier, since API
> breakage occurred since version 3.3.401.R36_v20100727-0110    MANIFEST.MF   
> /org.eclipse.jdt.apt.core/META-INF    line 5    Version Numbering Problem
> The super interfaces set has been reduced for type
> org.eclipse.jdt.apt.core.build.JdtApt    JdtApt.java   
> /org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/build    line 35   
> Compatibility Problem
This is expected as org.apache.tools.ant.ProjectComponent doesn't implement Cloneable in ant 1.6.5.

> Replacing the version of Ant with 1.8.2 did not make the error go away, I had
> to clean the entire workspace to make the problems go away.
Rebuilding only org.eclipse.jdt.apt.core.build.JdtApt is enough to make the error go away.

So now the problem is more to find out why org.eclipse.jdt.apt.core.build.JdtApt was not rebuilt once org.apache.ant has been replaced with a newer version.

So I believe that the patch does the right thing which is to "flush" the api description when needed (not just for api tools projects).

There is now a rebuild issue that needs to be understood.
Comment 9 Michael Rennie CLA 2011-03-31 12:20:01 EDT
+1 for the original patch, as it does solve the replace problem.
Comment 10 Olivier Thomann CLA 2011-03-31 12:52:10 EDT
The rebuild issue comes from the fact that the api tools builder doesn't detect a classpath change.
The Java builder does a full build of apt.core, but the Api Tools builder doesn't detect the classpath change. Therefore it doesn't do a full build.
Since there is no other change, nothing is done. I'll open a new bug report for this issue.

I'll check why with the original steps the apt core project is rebuilt.
Comment 11 Olivier Thomann CLA 2011-03-31 13:03:32 EDT
I opened bug 341524 to track down the classpath change issue.
Comment 12 Olivier Thomann CLA 2011-03-31 14:08:10 EDT
Released for 3.7M7.