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

Bug 366509

Summary: Optional package import produces uses constraint failure
Product: [Eclipse Project] Equinox Reporter: Glyn Normington <glyn.normington>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3    
Version: 3.7.1   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
URL: http://www.eclipse.org/forums/index.php/bm/msg/263241/1/on/0/?SQ=aea272ed0a3ce4b5db3baa54bfb4fc84
Whiteboard: stalebug
Attachments:
Description Flags
bundle to reproduce problem
none
bundle to reproduce problem none

Description Glyn Normington CLA 2011-12-13 05:02:11 EST
Equinox should drop optional package imports to avoid uses constraint failures, but the attached bundles show a case in which this does not happen.

The manifests are as follows:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: toxic-exporter
Export-Package: toxic;uses:="javax.transaction",javax.transaction;version="1"

and:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: toxic-importer
Import-Package: toxic,javax.transaction;version="[0, 0]";resolution:="optional"

Note that (in vanilla Equinox) javax.transaction is exported at version 0 by the system bundle.

Steps to reproduce:

1. Run Equinox 3.7.1.R37x_v20110808-1106.
2. Install the attached bundles (which contain the above manifests).
3. Start toxic-importer.
4. Observe that toxic-importer fails to resolve due to a uses constraint failure.

This bug was observed while diagnosing bug 366218.
Comment 1 Glyn Normington CLA 2011-12-13 05:02:49 EST
Created attachment 208306 [details]
bundle to reproduce problem
Comment 2 Glyn Normington CLA 2011-12-13 05:03:07 EST
Created attachment 208307 [details]
bundle to reproduce problem
Comment 3 Glyn Normington CLA 2011-12-13 05:04:08 EST
Please note that this bug is not urgent as the user's original "exporter" bundle was badly formed and reworking it remove the resolution failure.
Comment 4 Eclipse Genie CLA 2019-10-28 20:14:03 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.