Debugging dependency resolution [message #1851620] |
Mon, 11 April 2022 11:23 |
Vaclav Hala Messages: 4 Registered: December 2021 |
Junior Member |
|
|
Hello, the other day I had a problem with investigating why some plugins are ending up in my materialized product. I found no simple way to display the walk through the target platform which eventually results in list of bundles being present in the product. I ended up using debugger and printing breakpoints to get this information by printing this
System.out.format("%s -[%s]> %s\n", iu.getId(), req, match.getId());
inside Slicer at line
which gave me output like this that quickly helped me find what I was looking for
[INFO] Resolving dependencies of MavenProject: group:my.product:0.0.1-SNAPSHOT @ /data/my.product/pom.xml
my.product -[org.eclipse.equinox.p2.iu; my.feature.feature.group 0.0.0]> my.feature.feature.group
my.product -[org.eclipse.equinox.p2.iu; other.feature.feature.group 0.0.0]> other.feature.feature.group
my.feature.feature.group -[java.package; my.bundle.api 0.0.0]> my.bundle
...
So first a question - is there some better way to get to this information?
And second, if there is no way to do this, would it be possible to add some listener to Slicer and other similar algorithms which would enable arbitrary visualization like simply printing the walk as I did or e.g. assembling a .dot file that can be used to visualize it graphically. I'm thinking something as simple as this
public class Slicer {
public IQueryable<IInstallableUnit> slice(
IInstallableUnit[] ius,
ISlicingListener slicingListener,
IProgressMonitor monitor) { ... }
interface ISlicingListener{
void slicingStarted(IInstallableUnit[] ius);
void considered(
IInstallableUnit requestor,
IRequirement requirement,
IInstallableUnit match)
}
void slicingSucceeded();
void slicingFailed();
}
so that tooling like Tycho can provide own useful implementations
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03388 seconds