| Summary: | Specifying packages as true-api, provisional, for-friends-only, internal etc | ||
|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Thomas Watson <tjwatson> |
| Component: | UI | Assignee: | PDE-UI-Inbox <pde-ui-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | david_williams, deboer, jdmiles, jeffmcaffer, john.arthorne, nigelipse, robin, slewis |
| Version: | 3.4 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
|
Description
Thomas Watson
We must be aware of complexity creep here. Even if the added complexity is not that much, it all adds up and it all deters newcomers from Eclipse. Having said that, it seems to me that there is a better solution. The only way to be safe when using a provisional API in production is if the bundle dependency restricts the version to the latest tested version. This suggests a possible solution to this bug. If the version of the exporting bundle is equal to the last possible version in the version range specified in the consuming bundle's manifest then there is no need to show the warnings. The warnings should not be shown because there is no possibility of a later version breaking the API because there is no later version that can satisfy the requirements. This does mean every time you upgrade the exporting bundle, you must update the version in the manifests of the consuming bundles, but this is good practice. The process is: upgrade the bundle that has the provisional API, check the API is not broken. If not, increase the upper version limit. If it is, fix your bundle and set both lower and upper versions. Of course, if you are not near production status then you can choose to simply ignore all such warnings. Just be sure that before going into production you turn on the warnings and then set the version ranges correctly in order to fix the warnings. To summarize: Rather than have a yet more complex syntax to allow developers to ignore legitimate warnings, we would be solving the problem with no extra syntax. We would simply be removing warnings which are not legitimate, thus encouraging developers to set the version ranges correctly. (In reply to comment #1) > Having said that, it seems to me that there is a better solution. The only way > to be safe when using a provisional API in production is if the bundle > dependency restricts the version to the latest tested version. This suggests a > possible solution to this bug. If the version of the exporting bundle is equal > to the last possible version in the version range specified in the consuming > bundle's manifest then there is no need to show the warnings. The warnings > should not be shown because there is no possibility of a later version breaking > the API because there is no later version that can satisfy the requirements. > I think there are some versioning issues with your suggestion. I don't think we can get rid of the warnings if the version of the exporting bundle is equal to the last possible version of the version range specified. This will still allow the bundle to be installed and run on older versions of the bundle that may not have the provisional API. Also, we need to consider what to do for Import-Package as well as Require-Bundle. I agree that new syntax may not be the correct answer. We should also consider allowing more fine grained control in PDE to all exceptions per package on the project. I would suggest that it should never be turned off. However it would be adequate to be able to filter to 1 warning for the whole bundle. That way the developer is still warned but it will be much easier to wade though the warnings. 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. Closing as wontfix. I think doing anything more advanced that x-friends and x-internal is likely a bad idea at this point. Especially given that Java Modules seems to have gone the simple x-friends route. *** Bug 274514 has been marked as a duplicate of this bug. *** |