Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 449110

Summary: Provide jdt.annotation.1.1.0 unambiguously
Product: [Eclipse Project] JDT Reporter: Ed Willink <ed>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: manoj.palat, srikanth_sankaran
Version: 4.4   
Target Milestone: 4.5 M4   
Hardware: PC   
OS: Windows NT   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=449520
Whiteboard:

Description Ed Willink CLA 2014-10-28 16:46:53 EDT
jdt.annotation is unique in offering two compile-time contributions that are incompatible.

Eclipse is unable to handle this situation since it knows that 2.0 is better and many scenarios such as package import, plugin export ignore/do not support versions and therefore give inappropriate functionality for Java 7 users.

This problem could be solved by offering a duplicate packaging of org.eclipse.jdt.annotation_1.1.0 as perhaps org.eclipse.jdt.annotation_7_1.1.0 thereby allowing an unambiguous reference by Java 7 users.

[If JDT does not provide this centrally, I will have to provide a repackaging within my own project.]
Comment 1 Ed Willink CLA 2014-10-30 05:47:38 EDT
As requested off-line.

The lack of versions for import was a major pain during the Luna release cycle since the original Wiki recommendation to use import was totally messed up by the Java 8 distribution. You successfully broke 100% of your users who had followed your advice.

Moving to an optional require-bundle resolved most of the issues, but I occasionally get a new nightmare when I accidentally have a non-optional for which IIRC JDT gives a very confusing message about inconsistent Java 8 support when I have no Java 8 anywhere. Clearly non-optional means ignore explicit versions to P2.

(This is probably the same bug that inhibits installation of ASM3 from Orbit when ASM5 is already installed.)

The new problem affecting my users is that when my user does export plugins to get a distribution, the distribution has the wrong/new JDT annotation plugin.

All of this would be solved by eliminating the idiotic needless aspiration that incompatible same-named bundles can co-exist. If I can change all my manifest/build plugin references to org.eclipse.jdt.annotation_7_1.1.0 (still org.eclipse.jdt.annotation in Java source) it will be clear what is required.
Comment 2 Stephan Herrmann CLA 2014-10-30 18:41:58 EDT
(In reply to Ed Willink from comment #1)
> The lack of versions for import was a major pain during the Luna release
> cycle

what versions were lacking?

> since the original Wiki recommendation to use import

The wiki pointed to the help, which described what the quickfix did at each respective release. I *believe* the broken scenario you are referring to is the approach via build.properties # additional.bundles.

> was totally messed up by the Java 8 distribution.

We admitted to have given advice that was no longer suitable when Java 8 was released. Still there was the reasonable option to fix that approach using an explicit target platform. In my vocabulary "totally messed up" has a different meaning

 
> Moving to an optional require-bundle resolved most of the issues, but I
> occasionally get a new nightmare when I accidentally have a non-optional for
> which IIRC JDT gives a very confusing message about inconsistent Java 8
> support when I have no Java 8 anywhere.

That is too vague for being acted upon. Please describe the exact problem or let's agree this approach is working.

> Clearly non-optional means ignore explicit versions to P2.

"Clearly"? To whom? You are saying P2 cannot handle legal OSGi situations? Can you please cite the corresponding bug against P2?


> The new problem affecting my users is that when my user does export plugins
> to get a distribution, the distribution has the wrong/new JDT annotation
> plugin.

Please provide reproducible steps.

As you know well, I'm not the power that decides about bundle names, but for forwarding this request to the JDT leads, this report would need to keep to the facts, and provide a precise description of which exact procedures create wrong results.
Comment 3 Ed Willink CLA 2014-10-31 05:08:41 EDT
I am sorry but in the same way that you are frustrated by JDT naming gateways, this has exhausted my patience. I will start shipping org.eclipse.ocl.jdt.annotation.
Comment 4 Stephan Herrmann CLA 2014-10-31 12:56:26 EDT
(In reply to Ed Willink from comment #3)

"Interesting" interpretation of my comment.

Well, with no reproducible problem there's nothing for us to fix.
Comment 5 Manoj N Palat CLA 2014-12-10 00:15:50 EST
Verified for Eclipse Mars 4.5 M4 using build  I20141209-2000