Bug 457197 - JDT (core, and related) should export version of packages.
Summary: JDT (core, and related) should export version of packages.
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-10 12:49 EST by David Williams CLA
Modified: 2015-02-19 05:30 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams CLA 2015-01-10 12:49:54 EST
This issue came up in some discussions during bug 442310. 

It that bug, we have to use "import packages" and the main purpose is to "get" a version of JDT that has Java 8 support. 

As it is, if there happened to be "the wrong" version on someone's server, they would not find out until much later, during runtime, that they did not have Java 8 support. With the exported pages versioned, they would get an error "right away" and not risk a later runtime error. 

As far as I know, each JDT bundle could export its packages at the same version as the bundle, such as 

Export-Package: org.eclipse.jdt.core;version="3.11.0",
 (for every exported bundle, not just the first one the list)

Not sure it is that important for "UI" bundles (but wouldn't hurt), but I'd think 
jdt.core, and jdt.annotations would be the some of the most important ones. 

Note: one time to consider versioning packages as something different than the bundle version, if if the package is a "pure interface" that supports some particular version of a "specification". "apt" *might* be a candidate for that ... but ... I'm not sure off the top of my head. 

Plus, ideally, if from one releases to another, one package did not change from one release to the next, there's no reason to change it's exported version. But a) do not think we have good tools for that, and b) in practice, not too many people take it to this level of detail. So, for simplicity, you could create an "editor command" so that when you increased the bundle version, you'd change all the package versions at the same time.
Comment 1 David Williams CLA 2015-01-10 12:53:14 EST
Adding Tom and Dani to CC, in case they want to correct what I said, and/or if they know of any downsides to doing this (other than the slightly extra work). 

I should also add, even if this is done, for Mars, I doubt we'd go back and change the Orbit bundle discussed in bug 442310, so I consider this as "preparing for the future" (such as when Java 9 comes out?!) more than solving any particular issue right now.
Comment 2 Dani Megert CLA 2015-02-19 05:30:40 EST
We already have enough manual work to get the required bundle versions correct/up-to-date. In addition, almost no bundle exports packages with a versions (except maybe Equinox).

Suggest to nothing here for now.