eclipse-pde-partial-idea
eclipse-pde-partial-idea copied to clipboard
Discover dependencies from Maven-imported artifacts
I'm using Eclipse Tycho to import repositories with p2 layout. I'm not using the Target Platform configuration.
However PDE Partial does not understand that I already have dependencies imported.
Take the first MANIFEST entry for example, org.eclipse.ui

You can see that the dependency has been correctly set-up in the Module itself.

This is also probably why #85 does not work correctly.
FYI, for Tycho support, follow https://youtrack.jetbrains.com/issue/IDEA-186628/Tycho-support-is-broken I've been able to get it to work, mostly.
PDE Partial was read and build the dependencies tree when Target Platform was configured, and then use the tree and MANIFEST.MF to add bundle dependencies for module.
When checking the MANIFEST.MF header, it always use that tree information, not from module's dependencies.
So it occur this issue.
@JaneWardSandy yeah that's what I thought! Do you think it's feasible to change how it works, or it's a too big task? For example it would be enough to scan the Module order entries and check for a library with the same name as the required bundle (just maybe).
@lppedd For the existence check of Required-Bundle, it is feasible to adjust to read the dependencies of Module.
However, if it is read during inspection, there may be performance problems, including automatic completion of BSN lists, version checking, and importing and exporting package checks. But if you build a cache, when to invalidate and refresh becomes another question. This is my current knowledge blind spot, so I only rebuild the cache when I change the Target Platform.
In the past (in the project code before this project was open sourced), code checking was not using a pre-built dependency tree, but only a single Bundle cache. When checking dependencies, reading dependencies, re-Exported dependencies, and importing packages are all read and generated during checking. Even if there is BundleManifestCacheService, it will cause the code to be stuck for more than 10 seconds during the check, and it is a knock Word gets stuck once.
So when refactoring the open source code, BundleManagementService was added to build the dependency tree in advance.
If you have a good way to solve the time overhead, maybe the Header of MANIFEST.MF can be changed to directly read Module dependencies.