Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.jdt.core.tests.builder;bundle-version="[3.8.0,4.0.0)",
org.eclipse.jdt.core.tests.compiler;bundle-version="[3.8.0,4.0.0)",
org.eclipse.ant.core,
org.eclipse.pde.api.tools.annotations,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.eclipse.pde.api.tools.annotations should never be imported, it is automatically added to all PDE projects as in implicit dependency if it has the api tools nature.

Also I don't see that anything has recently changed here so why should it be necessary now but not before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.eclipse.pde.api.tools.annotations should never be imported, it is automatically added to all PDE projects as in implicit dependency if it has the api tools nature.

Should I add it to the plugin test launch configuration then?

Also I don't see that anything has recently changed here so why should it be necessary now but not before?

No idea, though I doubt the test was always failing locally. Maybe its due to your change that trimmed the plugins in a plugin launch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I add it to the plugin test launch configuration then?

It depends a bit, this is a compile time dependency so why is it required at all? But if it helps it might be a good way to make progress, but adding actually unused items to manifest will sooner or later make trouble as we try to actively purge unused items there.

No idea, though I doubt the test was always failing locally. Maybe its due to your change that trimmed the plugins in a plugin launch.

As far as I know there are some already prepared launches for some test (@merks ?) so probably one needs to use those.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are quite some launch configurations that are checked in but I doubt they are well maintained:

image

I too wondered what changed that there should be a new requirement...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I add it to the plugin test launch configuration then?

It depends a bit, this is a compile time dependency so why is it required at all?

Its a part of the test project dependencies:

    message: Bundle 'org.eclipse.pde.api.tools.annotations' cannot be resolved
    severity: 2
    line number: 15
    resource: /refproject/META-INF/MANIFEST.MF
➜  eclipse.pde git:(master) cat apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojects/refproject/META-INF/MANIFEST.MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: refproject
Bundle-SymbolicName: refproject
Bundle-Version: 1.0.0
Export-Package: a,
 c,
 e,
 f,
 i,
 m,
 pack.multi.part
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600",
 org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"

Without it the compile of the test project doesn't work, by the looks of it. Other test projects also require it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are things like this as ways to define "dependencies" that are not supposed to be runtime dependencies:

image image

Probably the additional-bundles would be appropriate.

But, given this is a test, I'm also not sure that we needed to be purists about that its runtime dependency should be, though if they are auto-removed later, that would be unhelpful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would see if we can instead remove the imports from the test-bundles... these should no longer be needed at all (one would start with one of them to see if that's true).

In any case one would expect that pde.api tools already has a requirement (otherwise it can't process them!) so should be included in a launch that tests API tools... and it seem to work in ibuilds and maven.

But, given this is a test, I'm also not sure that we needed to be purists about that its runtime dependency should be, though if they are auto-removed later, that would be unhelpful.

Even though it would be not directly harmful, we I think we should not hide bugs/problems in PDE even though it seems easy enough. And as mentioned its likely that such unused imports are removed sooner or later then.

Copy link
Contributor Author

@trancexpress trancexpress Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.eclipse.pde.api.tools.annotations should never be imported, it is automatically added to all PDE projects as in implicit dependency if it has the api tools nature.

@laeubi any idea why this wouldn't work during the test (launched from Eclipse)? Is it because the launch itself doesn't have the plug-in? And so automatically adding doesn't work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would see if we can instead remove the imports from the test-bundles... these should no longer be needed at all (one would start with one of them to see if that's true).

I tried, still DependentUsageTests fails when ran from Eclipse. E.g.:

    resource: /refproject/src/c/MultipleThrowableClass.java
    message: The import org.eclipse.pde.api.tools.annotations cannot be resolved
    severity: 2
    line number: 16

(there are test classes that import types from org.eclipse.pde.api.tools.annotations)

The launch doesn't have the bundle selected:

image

I'm not seeing org.eclipse.pde.api.tools.annotations being required by any plug-in:

image

After removing the mentions in test projects, I also don't see package imports:

➜  eclipse.pde git:(master) ✗ git grep org.eclipse.pde.api.tools.annotations -- "**MANIFEST.MF"
apitools/org.eclipse.pde.api.tools.annotations/META-INF/MANIFEST.MF:Bundle-SymbolicName: org.eclipse.pde.api.tools.annotations;singleton:=true
apitools/org.eclipse.pde.api.tools.annotations/META-INF/MANIFEST.MF:Export-Package: org.eclipse.pde.api.tools.annotations
apitools/org.eclipse.pde.api.tools.annotations/META-INF/MANIFEST.MF:Automatic-Module-Name: org.eclipse.pde.api.tools.annotations

The diff:

diff --git a/apitools/org.eclipse.pde.api.tools.tests/test-builder/tagprojects/java17tags/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.tests/test-builder/tagprojects/java17tags/META-INF/MANIFEST.MF
index 347671d288..a54c644b3d 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/test-builder/tagprojects/java17tags/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools.tests/test-builder/tagprojects/java17tags/META-INF/MANIFEST.MF
@@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
 Bundle-Name: java17tags
 Bundle-SymbolicName: java17tags
 Bundle-Version: 1.0.0.qualifier
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
+Require-Bundle: org.eclipse.core.runtime
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Export-Package: a.b.c
diff --git a/apitools/org.eclipse.pde.api.tools.tests/test-builder/tagprojects/java8tags/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.tests/test-builder/tagprojects/java8tags/META-INF/MANIFEST.MF
index e0ca5669d6..473db98a71 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/test-builder/tagprojects/java8tags/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools.tests/test-builder/tagprojects/java8tags/META-INF/MANIFEST.MF
@@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
 Bundle-Name: java8tags
 Bundle-SymbolicName: java8tags
 Bundle-Version: 1.0.0.qualifier
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
+Require-Bundle: org.eclipse.core.runtime
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Export-Package: a.b.c
diff --git a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojects/refproject/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojects/refproject/META-INF/MANIFEST.MF
index 002512c5a5..1d30672a26 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojects/refproject/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojects/refproject/META-INF/MANIFEST.MF
@@ -11,5 +11,4 @@ Export-Package: a,
  m,
  pack.multi.part
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600",
- org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
+Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600"
diff --git a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojects/usagetests/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojects/usagetests/META-INF/MANIFEST.MF
index ea1a0d75a9..54520fc07a 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojects/usagetests/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojects/usagetests/META-INF/MANIFEST.MF
@@ -5,7 +5,6 @@ Bundle-SymbolicName: usagetests
 Bundle-Version: 1.0.0
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Require-Bundle: refproject,
- org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0",
  refprojectjava7;bundle-version="1.0.0";resolution:=optional,
  refprojectjava8;bundle-version="1.0.0";resolution:=optional
 Export-Package: internal.x.y.z;x-internal:=true,
diff --git a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava7/refprojectjava7/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava7/refprojectjava7/META-INF/MANIFEST.M
F
index 8b972c6882..4ae99bec54 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava7/refprojectjava7/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava7/refprojectjava7/META-INF/MANIFEST.MF
@@ -11,5 +11,4 @@ Export-Package: a,
  m,
  pack.multi.part
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600",
- org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
+Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600"
diff --git a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava7/usageprojectjava7/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava7/usageprojectjava7/META-INF/MANIFE
ST.MF
index 82d29239ea..1c82a09c0f 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava7/usageprojectjava7/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava7/usageprojectjava7/META-INF/MANIFEST.MF
@@ -4,5 +4,4 @@ Bundle-Name: usageprojectjava7
 Bundle-SymbolicName: usageprojectjava7
 Bundle-Version: 1.0.0
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: refprojectjava7,
- org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
+Require-Bundle: refprojectjava7
diff --git a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava8/refprojectjava8/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava8/refprojectjava8/META-INF/MANIFEST.M
F
index f23afe7a10..a9ea0d601b 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava8/refprojectjava8/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava8/refprojectjava8/META-INF/MANIFEST.MF
@@ -5,5 +5,4 @@ Bundle-SymbolicName: refprojectjava8
 Bundle-Version: 1.0.0
 Export-Package: c,i,m
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600",
- org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
+Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600"
diff --git a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava8/usageprojectjava8/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava8/usageprojectjava8/META-INF/MANIFE
ST.MF
index d619684c58..3579bb227c 100644
--- a/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava8/usageprojectjava8/META-INF/MANIFEST.MF
+++ b/apitools/org.eclipse.pde.api.tools.tests/test-builder/usageprojectsjava8/usageprojectjava8/META-INF/MANIFEST.MF
@@ -5,5 +5,4 @@ Bundle-SymbolicName: usageprojectjava8
 Bundle-Version: 1.0.0
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Require-Bundle: refprojectjava8;bundle-version="1.0.0",
- refproject,
- org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
+ refproject

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I forgot that one in...

org.eclipse.pde.ui.tests
Bundle-RequiredExecutionEnvironment: JavaSE-21
Export-Package: org.eclipse.pde.api.tools.anttasks.tests;uses:="org.eclipse.core.resources",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: java17tags
Bundle-SymbolicName: java17tags
Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
Require-Bundle: org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: a.b.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
###############################################################################
source.. = src/
output.. = bin/
additional.bundles = org.eclipse.pde.api.tools.annotations
bin.includes = META-INF/,\
.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: java8tags
Bundle-SymbolicName: java8tags
Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
Require-Bundle: org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: a.b.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
###############################################################################
source.. = src/
output.. = bin/
additional.bundles = org.eclipse.pde.api.tools.annotations
bin.includes = META-INF/,\
.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Export-Package: a,
m,
pack.multi.part
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600",
org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600"
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
# IBM Corporation - initial API and implementation
###############################################################################
source.. = src/
additional.bundles = org.eclipse.pde.api.tools.annotations
bin.includes = META-INF/,\
.,\
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Bundle-SymbolicName: usagetests
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: refproject,
org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0",
refprojectjava7;bundle-version="1.0.0";resolution:=optional,
refprojectjava8;bundle-version="1.0.0";resolution:=optional
Export-Package: internal.x.y.z;x-internal:=true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
###############################################################################
source.. = src/
output.. = bin/
additional.bundles = org.eclipse.pde.api.tools.annotations
bin.includes = META-INF/,\
.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Export-Package: a,
m,
pack.multi.part
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600",
org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600"
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
# IBM Corporation - initial API and implementation
###############################################################################
source.. = src/
additional.bundles = org.eclipse.pde.api.tools.annotations
bin.includes = META-INF/,\
.,\
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ Bundle-Name: usageprojectjava7
Bundle-SymbolicName: usageprojectjava7
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: refprojectjava7,
org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
Require-Bundle: refprojectjava7
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# IBM Corporation - initial API and implementation
###############################################################################
source.. = src/
additional.bundles = org.eclipse.pde.api.tools.annotations
bin.includes = META-INF/,\
.

Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ Bundle-SymbolicName: refprojectjava8
Bundle-Version: 1.0.0
Export-Package: c,i,m
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600",
org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
Require-Bundle: org.eclipse.pde.api.tools;bundle-version="1.0.600"
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
# IBM Corporation - initial API and implementation
###############################################################################
source.. = src/
additional.bundles = org.eclipse.jdt.annotation,org.eclipse.pde.api.tools.annotations
bin.includes = META-INF/,.
additional.bundles = org.eclipse.jdt.annotation
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ Bundle-SymbolicName: usageprojectjava8
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: refprojectjava8;bundle-version="1.0.0",
refproject,
org.eclipse.pde.api.tools.annotations;bundle-version="1.0.0"
refproject
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# IBM Corporation - initial API and implementation
###############################################################################
source.. = src/
additional.bundles = org.eclipse.pde.api.tools.annotations
bin.includes = META-INF/,\
.

Loading