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

Bug 370617

Summary: Platform UI e4 bundles should use version ranges for dependencies
Product: [Eclipse Project] Platform Reporter: Curtis Windatt <curtis.windatt.public>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pwebster
Version: 4.2   
Target Milestone: 4.2 M6   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Curtis Windatt CLA 2012-02-03 18:16:16 EST
Saw that some of the bundles specify single versions or no version on their dependencies.  The dependencies will break if your target platform changes.

Also, there are no PDE compiler settings.  It's worth adding project specific settings to ensure that plug-in strings are externalized correctly (which are ignored by default).
Comment 1 Paul Webster CLA 2012-02-06 08:27:59 EST
I think in general we want to be specifying the lowest bundle version.  I'm not as convinced about specifying the higher version number, especially for the e4 bundles that haven't published API.  Or did you mean in against the runtime and equinox bundles?

PW
Comment 2 Curtis Windatt CLA 2012-02-06 10:56:00 EST
In the bundles I looked at, there were no maximum versions set.  This includes jface, core, osgi, etc which all have real APIs.  Some did not specify a version constraint at all.  Even if the e4 bundles are not providing API yet, they should still be following proper OSGi style versioning so it is safe to specify a range.
Comment 3 Curtis Windatt CLA 2012-02-07 16:32:11 EST
I took a little time to set the pde preferences in the e4 platform ui bundles I had in my workspace then corrected any dependency problems.  I left any dependencies on *.e4.* as just a minimum version in case their major versions are bumped when API becomes official. I also externalized some strings in the plugin.xml and checked that all packages were exported.

I pushed the two commits to a branch on my GitHub fork:
https://github.com/CWindatt/eclipse.platform.ui/tree/cwindatt/bug370617
Comment 4 Paul Webster CLA 2012-02-08 09:24:46 EST
Hi Curtis,

your branch also contains a commit for bug 370615.  It should be rebased off of master, and only contain commits towards this bug.  I can't currently apply them or cherry-pick them, they contain conflicts.

Also, if you have 2 or more commits for one bug and you haven't pushed, after rebasing on your  origin/master you can squash them either from the command line git or by selecting the base commit (like master), doing a reset "soft" and then committing your changes again (this commit will contain all of the changes of your 2 commits).

PW
Comment 5 Curtis Windatt CLA 2012-02-09 13:16:11 EST
Fixed (hopefully)
https://github.com/CWindatt/eclipse.platform.ui/commit/4458749dd268431c69ffb5a45ea945ccdb264529

Sorry about the tracing change being mixed in, the branch was based off of my local master instead of origin master.
Comment 6 Paul Webster CLA 2012-02-09 13:46:36 EST
bundles/org.eclipse.e4.ui.model.workbench.edit/META-INF/MANIFEST.MF
org.eclipse.emf.edit;bundle-version="[2.8.0,3.0.0)";visibility:=reexport,
Needs to be wider range

bundles/org.eclipse.e4.ui.model.workbench/META-INF/MANIFEST.MF
EMF needs to be wider range.

I made those 2 changes, amended the commit, and pushed .

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=154f39587dfebd62e1f8156f9a016c8f3b685433

PW