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

Bug 312091

Summary: identify erroneous optional dependencies
Product: [Eclipse Project] PDE Reporter: Jeff McAffer <jeffmcaffer>
Component: API ToolsAssignee: PDE API Tools Inbox <pde-apitools-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: stalebug

Description Jeff McAffer CLA 2010-05-07 11:45:27 EDT
From time to time bundles have optional dependencies. Often the code in the bundle directly references the optional classes and is structured to either optionally fallback if the requested class is not available or to simply not try to access the optional classes when it should not.

It would be interesting to have some PDE help on ensuring that the optional dependencies really are optional.  For example, I recently had an issue in ECF where a class returned IProxyData in the method signature.  IProxyData came from the o.e.core.net.proxy package which was optionally imported. Since the  proxy type was referenced in the method signature, the class would not load at all if IProxyData was not around. This was a programming error that was not caught because the team always had proxy support available.

It may be hard to distinquish real references from optoinal (for example, if the referencing type was simply not used when proxy support was not around, the reference would be fine).  However, perhaps with some markup developers would be able to explicitly mark a class as optionally referencing a type (i.e., constructs that would prevent the class from loading would be errors).  There may be more error states we can detect in the tooling...

The value in adding this sort of tooling is that the problems that arise are often very difficult to find when they are happening and challenging to prevent without running in all manner of different configurations (which admittedly the test cases should catch but...)
Comment 1 Eclipse Webmaster CLA 2019-09-06 15:31:12 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.
Comment 2 Julian Honnen CLA 2019-09-09 02:44:53 EDT
Please remove the stalebug flag, if this issue is still relevant and can be reproduced on the latest release.