Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 488694 - [patch] API Tools builder wrongly "weaves" dev properties into manifests of non-workspace bundles
Summary: [patch] API Tools builder wrongly "weaves" dev properties into manifests of n...
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 4.6   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.6 RC1   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-29 09:23 EST by Markus Keller CLA
Modified: 2016-05-12 05:20 EDT (History)
2 users (show)

See Also:
Vikas.Chandra: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2016-02-29 09:23:53 EST
I20160223-0800

- new workspace
- clone git://git.eclipse.org/gitroot/platform/eclipse.platform.runtime.git
- import all projects from /bundles

- launch new runtime workspace
- set API Baseline to 4.5.1
- set Target Platform to a new target definition that uses the Installation of the I20160223-0800 build you used initially
- add Git repo eclipse.platform.runtime (you can reuse the cloned one from the host workspace)
- import /bundles/org.eclipse.core.runtime

25 Errors like these:

* The major version should be incremented in version 3.12.0, since API breakage occurred since version 3.11.1	MANIFEST.MF	/org.eclipse.core.runtime/META-INF	line 4	Version Numbering Problem

* The re-exported type org.eclipse.core.runtime.content.BinarySignatureDescriber has been removed from org.eclipse.core.runtime_3.11.1	MANIFEST.MF	/org.eclipse.core.runtime/META-INF	line 1	Compatibility Problem

The problem is the same as bug 332112: The PDE model doesn't properly encapsulate the support for "workspace projects" in the target platform or API baseline, and client code wrongly "weaves" the dev properties into manifests of bundles that are not even coming from the host workspace.
Comment 1 Eclipse Genie CLA 2016-02-29 09:26:03 EST
New Gerrit change created: https://git.eclipse.org/r/67545
Comment 2 Vikas Chandra CLA 2016-04-10 03:37:36 EDT
Even after this change I get  10 such errors.

Description	Resource	Path	Location	Type
The re-exported type javax.annotation.security.RolesAllowed has been removed from org.eclipse.core.runtime_3.11.0	MANIFEST.MF	/org.eclipse.core.runtime/META-INF	line 1	Compatibility Problem
The re-exported type javax.annotation.security.RunAs has been removed from org.eclipse.core.runtime_3.11.0	MANIFEST.MF	/org.eclipse.core.runtime/META-INF	line 1	Compatibility Problem


Is this expected or should this patch be taken along with some other patch?
Comment 3 Markus Keller CLA 2016-04-21 09:30:13 EDT
The patch still works for me when rebased on master. Updated instructions including how to take the patch:

I20160419-0800

- new workspace
- clone git://git.eclipse.org/gitroot/platform/eclipse.platform.runtime.git
  - (make sure you pulled from master if you reused an old repo)
  - import all projects from /bundles
- clone git://git.eclipse.org/gitroot/pde/eclipse.pde.ui.git
  - import /org.eclipse.pde.api.tools
  - (variant with patch: fetch branch change/67545/3, rebase on master)

- launch new runtime workspace
- set API Baseline to 4.5.2
- set Target Platform to a new target definition that uses the Installation of the I20160419-0800 build you used initially
- add Git repo eclipse.platform.runtime (you can reuse the cloned one from the host workspace)
- import /bundles/org.eclipse.core.runtime

=> With the patch, there are only a few warnings, but no errors any more.


I don't know what you changed to make org.eclipse.core.runtime think it requires and re-exports the javax.annotation bundle, but I don't think that's related to this bug.
Comment 5 Vikas Chandra CLA 2016-05-08 07:38:27 EDT
The fix works well. I am getting exactly 1 random api tool error with or without the patch ( that too different one at different times ) in totally unrelated tests.

Although a workaround, the fix is good for RC1 and important in the sense ( for 4.6) that API tools was wrongly identifying binary workspace bundle.
Comment 6 Vikas Chandra CLA 2016-05-08 07:38:41 EDT
Thanks Markus
Comment 7 Vikas Chandra CLA 2016-05-12 05:20:12 EDT
verified on 
Version: Neon (4.6)
Build id: I20160511-2000