Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spies] Provide inter-bundle dependency information in Bundle-Spy #835

Open
HannesWell opened this issue Oct 28, 2023 · 1 comment
Open

Comments

@HannesWell
Copy link
Member

Similar to the unpublished (and maybe soon removed Plugin) o.e.core.tools the PDE Bundle Spy should provide information about dependencies between bundles, their required bundles, imported-packages and required capabilities together etc. with the provider).

eclipse-platform/eclipse.platform#787 gives an impression how this could be done, but the details of course can vary.

The Apache Felix Gogo shell (aka. Host OSGi console) shipped with Eclipse also provides such information already:

Find out the bundle-id using the lb command.

g! lb
START LEVEL 6
   ID|State      |Level|Name
    0|Active     |    0|OSGi System Bundle (3.18.600.v20231025-1615)|3.18.600.v20231025-1615
    1|Resolved   |    4|Equinox State and Resolver Compatibility Fragment (1.2.800.v20221116-1440)|1.2.800.v20221116-1440
[...]
 1914|Active     |    4|PDE Core (3.17.200.v20231025-1115)|3.17.200.v20231025-1115
[...]

Required Bundles:

g! inspect requirement osgi.wiring.bundle 1914
org.eclipse.pde.core_3.17.200.v20231025-1115 [1914] requires:
-------------------------------------------------------------
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.core.runtime)(&(bundle-version>=3.29.0)(!(bundle-version>=4.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.core.runtime 3.30.0.v20230929-1548 from org.eclipse.core.runtime_3.30.0.v20230929-1548 [1663]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.e4.core.contexts)(&(bundle-version>=1.12.300)(!(bundle-version>=2.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.e4.core.contexts 1.12.400.v20231011-1103 from org.eclipse.e4.core.contexts_1.12.400.v20231011-1103 [1785]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.e4.core.services)(&(bundle-version>=2.4.200)(!(bundle-version>=3.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.e4.core.services 2.4.200.v20231011-1103 from org.eclipse.e4.core.services_2.4.200.v20231011-1103 [1789]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.jdt.core)(&(bundle-version>=3.36.0)(!(bundle-version>=4.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.jdt.core 3.36.0.v20231025-1911 from org.eclipse.jdt.core_3.36.0.v20231025-1911 [1904]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.team.core)(&(bundle-version>=3.10.200)(!(bundle-version>=4.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.team.core 3.10.200.v20230914-0751 from org.eclipse.team.core_3.10.200.v20230914-0751 [1511]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.text)(&(bundle-version>=3.13.100)(!(bundle-version>=4.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.text 3.13.100.v20230801-1334 from org.eclipse.text_3.13.100.v20230801-1334 [916]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.jdt.launching)(&(bundle-version>=3.21.0)(!(bundle-version>=4.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.jdt.launching 3.21.0.v20231026-1205 from org.eclipse.jdt.launching_3.21.0.v20231026-1205 [1908]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.core.filebuffers)(&(bundle-version>=3.8.200)(!(bundle-version>=4.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.core.filebuffers 3.8.200.v20230921-0933 from org.eclipse.core.filebuffers_3.8.200.v20230921-0933 [1537]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.core.variables)(&(bundle-version>=3.6.200)(!(bundle-version>=4.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.core.variables 3.6.200.v20230914-0751 from org.eclipse.core.variables_3.6.200.v20230914-0751 [1473]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.pde.build)(&(bundle-version>=3.12.200)(!(bundle-version>=4.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.pde.build 3.12.200.v20230927-0753 from org.eclipse.pde.build_3.12.200.v20230927-0753 [1702]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.ant.core)(&(bundle-version>=3.7.200)(!(bundle-version>=4.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.ant.core 3.7.200.v20231025-0728 from org.eclipse.ant.core_3.7.200.v20231025-0728 [1889]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.equinox.simpleconfigurator.manipulator)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.equinox.simpleconfigurator.manipulator 2.3.0.v20230919-1457 from org.eclipse.equinox.simpleconfigurator.manipulator_2.3.0.v20230919-1457 [1564]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.equinox.frameworkadmin)(&(bundle-version>=2.3.0)(!(bundle-version>=3.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.equinox.frameworkadmin 2.3.0.v20230919-1457 from org.eclipse.equinox.frameworkadmin_2.3.0.v20230919-1457 [1549]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.debug.core)(&(bundle-version>=3.21.200)(!(bundle-version>=4.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.debug.core 3.21.200.v20231021-1513 from org.eclipse.debug.core_3.21.200.v20231021-1513 [1875]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.equinox.p2.engine)(&(bundle-version>=2.9.0)(!(bundle-version>=3.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.equinox.p2.engine 2.9.0.v20230921-2011 from org.eclipse.equinox.p2.engine_2.9.0.v20230921-2011 [1555]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.equinox.p2.core)(&(bundle-version>=2.10.200)(!(bundle-version>=3.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.equinox.p2.core 2.10.200.v20230912-1448 from org.eclipse.equinox.p2.core_2.10.200.v20230912-1448 [1348]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.equinox.p2.metadata)(&(bundle-version>=2.8.0)(!(bundle-version>=3.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.equinox.p2.metadata 2.8.0.v20231026-0645 from org.eclipse.equinox.p2.metadata_2.8.0.v20231026-0645 [1898]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.equinox.p2.director)(&(bundle-version>=2.6.200)(!(bundle-version>=3.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.equinox.p2.director 2.6.200.v20231021-1906 from org.eclipse.equinox.p2.director_2.6.200.v20231021-1906 [1877]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.equinox.p2.repository)(&(bundle-version>=2.8.0)(!(bundle-version>=3.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.equinox.p2.repository 2.8.0.v20231026-0645 from org.eclipse.equinox.p2.repository_2.8.0.v20231026-0645 [1899]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.equinox.p2.repository.tools)(&(bundle-version>=2.4.200)(!(bundle-version>=3.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.equinox.p2.repository.tools 2.4.200.v20231021-1906 from org.eclipse.equinox.p2.repository.tools_2.4.200.v20231021-1906 [1879]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.equinox.p2.garbagecollector)(&(bundle-version>=1.3.100)(!(bundle-version>=2.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.equinox.p2.garbagecollector 1.3.100.v20230630-1506 from org.eclipse.equinox.p2.garbagecollector_1.3.100.v20230630-1506 [152]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.equinox.p2.touchpoint.eclipse)(&(bundle-version>=2.4.100)(!(bundle-version>=3.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.equinox.p2.touchpoint.eclipse 2.4.100.v20230630-1506 from org.eclipse.equinox.p2.touchpoint.eclipse_2.4.100.v20230630-1506 [162]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.core.expressions)(&(bundle-version>=3.9.200)(!(bundle-version>=4.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.core.expressions 3.9.200.v20230921-0857 from org.eclipse.core.expressions_3.9.200.v20230921-0857 [1536]
osgi.wiring.bundle; (&(osgi.wiring.bundle=org.eclipse.core.filesystem)(&(bundle-version>=1.10.200)(!(bundle-version>=2.0.0)))) resolved by:
   osgi.wiring.bundle; org.eclipse.core.filesystem 1.10.200.v20230914-0751 from org.eclipse.core.filesystem_1.10.200.v20230914-0751 [1467]

Required Packages

g! inspect requirement osgi.wiring.package 1914
org.eclipse.pde.core_3.17.200.v20231025-1115 [1914] requires:
-------------------------------------------------------------
osgi.wiring.package; (&(osgi.wiring.package=aQute.bnd.build)(&(version>=4.4.0)(!(version>=5.0.0)))) resolved by:
   osgi.wiring.package; aQute.bnd.build 4.4.0 from biz.aQute.bndlib_6.4.1.202306080939 [6]
osgi.wiring.package; (&(osgi.wiring.package=aQute.bnd.build.model)(&(version>=4.2.0)(!(version>=5.0.0)))) resolved by:
   osgi.wiring.package; aQute.bnd.build.model 4.2.0 from biz.aQute.bndlib_6.4.1.202306080939 [6]
osgi.wiring.package; (&(osgi.wiring.package=aQute.bnd.header)(&(version>=2.5.0)(!(version>=3.0.0)))) resolved by:
   osgi.wiring.package; aQute.bnd.header 2.5.0 from biz.aQute.bndlib_6.4.1.202306080939 [6]
osgi.wiring.package; (&(osgi.wiring.package=aQute.bnd.osgi)(&(version>=5.5.0)(!(version>=8.0.0)))) resolved by:
   osgi.wiring.package; aQute.bnd.osgi 5.6.0 from biz.aQute.bndlib_6.4.1.202306080939 [6]
osgi.wiring.package; (&(osgi.wiring.package=aQute.bnd.osgi.repository)(&(version>=3.0.0)(!(version>=4.0.0)))) resolved by:
   osgi.wiring.package; aQute.bnd.osgi.repository 3.0.1 from biz.aQute.bndlib_6.4.1.202306080939 [6]
osgi.wiring.package; (&(osgi.wiring.package=aQute.bnd.osgi.resource)(&(version>=4.3.0)(!(version>=6.0.0)))) resolved by:
   osgi.wiring.package; aQute.bnd.osgi.resource 4.3.0 from biz.aQute.bndlib_6.4.1.202306080939 [6]
osgi.wiring.package; (&(osgi.wiring.package=aQute.bnd.properties)(&(version>=2.0.0)(!(version>=3.0.0)))) resolved by:
   osgi.wiring.package; aQute.bnd.properties 2.0.0 from biz.aQute.bndlib_6.4.1.202306080939 [6]
osgi.wiring.package; (&(osgi.wiring.package=aQute.bnd.service)(&(version>=4.7.0)(!(version>=5.0.0)))) resolved by:
   osgi.wiring.package; aQute.bnd.service 4.7.0 from biz.aQute.bndlib_6.4.1.202306080939 [6]
osgi.wiring.package; (&(osgi.wiring.package=aQute.bnd.version)(&(version>=2.2.0)(!(version>=3.0.0)))) resolved by:
   osgi.wiring.package; aQute.bnd.version 2.2.0 from biz.aQute.bndlib_6.4.1.202306080939 [6]
osgi.wiring.package; (&(osgi.wiring.package=aQute.service.reporter)(&(version>=1.2.0)(!(version>=2.0.0)))) resolved by:
   osgi.wiring.package; aQute.service.reporter 1.2.0 from biz.aQute.bndlib_6.4.1.202306080939 [6]
osgi.wiring.package; (osgi.wiring.package=org.eclipse.equinox.internal.p2.publisher.eclipse) resolved by:
   osgi.wiring.package; org.eclipse.equinox.internal.p2.publisher.eclipse 0.0.0 from org.eclipse.equinox.p2.publisher.eclipse_1.5.200.v20231019-1511 [1845]
osgi.wiring.package; (osgi.wiring.package=org.eclipse.equinox.p2.publisher) resolved by:
   osgi.wiring.package; org.eclipse.equinox.p2.publisher 0.0.0 from org.eclipse.equinox.p2.publisher_1.9.0.v20230921-2011 [1558]
osgi.wiring.package; (osgi.wiring.package=org.eclipse.equinox.p2.publisher.eclipse) resolved by:
   osgi.wiring.package; org.eclipse.equinox.p2.publisher.eclipse 0.0.0 from org.eclipse.equinox.p2.publisher.eclipse_1.5.200.v20231019-1511 [1845]
osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.repository)(&(version>=1.1.0)(!(version>=2.0.0)))) resolved by:
   osgi.wiring.package; org.osgi.service.repository 1.1.0 from org.osgi.service.repository_1.1.0.201505202024 [340]
osgi.wiring.package; (&(osgi.wiring.package=org.osgi.util.promise)(&(version>=1.3.0)(!(version>=2.0.0)))) resolved by:
   osgi.wiring.package; org.osgi.util.promise 1.3.0 from org.osgi.util.promise_1.3.0.202212101352 [347]

other namespaces are of course also possible.

@opcoach
Copy link
Contributor

opcoach commented Sep 25, 2024

May be this will be handled by the osgifx external spy ... which is really cool .. see #371

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants