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

Add a provided capability for the equinox transformer hook #729

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

laeubi
Copy link
Member

@laeubi laeubi commented Dec 21, 2024

Currently there is no way for a transformer hook extension to really declare any requirement on the transformer feature (beside require bundle it).

This now adds a provided capability and a corresponding requirement for the xslt.

@tjwatson can you review this? Will it work even though org.eclipse.equinox.transforms.hook is a framework-extension?

Copy link

github-actions bot commented Dec 21, 2024

Test Results

  663 files  ±0    663 suites  ±0   1h 15m 58s ⏱️ + 2m 24s
2 211 tests ±0  2 164 ✅ ±0   47 💤 ±0  0 ❌ ±0 
6 777 runs  ±0  6 634 ✅ ±0  143 💤 ±0  0 ❌ ±0 

Results for commit 2d9a762. ± Comparison against base commit 5810f68.

♻️ This comment has been updated with latest results.

@laeubi laeubi force-pushed the add_cap_to_transformer branch from 7126868 to b83803a Compare December 21, 2024 06:31
Currently there is no way for a transformer hook extension to really
declare any requirement on the transformer feature (beside require
bundle it).

This now adds a provided capability and a corresponding requirement for
the xslt.
@laeubi laeubi force-pushed the add_cap_to_transformer branch from b83803a to 2d9a762 Compare December 21, 2024 07:54
@laeubi
Copy link
Member Author

laeubi commented Dec 29, 2024

If I look at the bundle command I see this for the hook fragment:

Provide-Capability = osgi.extender;osgi.extender="equinox.transforms.hook"

but it is not shown for the system bundle

Provide-Capability = osgi.service; objectClass:List="org.osgi.service.log.LogReaderService,org.eclipse.equinox.log.ExtendedLogReaderService"; uses:="org.osgi.service.log",osgi.service; objectClass:List="org.osgi.service.log.LoggerFactory,org.osgi.service.log.LogService,org.eclipse.equinox.log.ExtendedLogService"; uses:="org.osgi.service.log",osgi.service; objectClass:List="org.osgi.service.log.admin.LoggerAdmin"; uses:="org.osgi.service.log.admin",osgi.service; objectClass:List="org.eclipse.osgi.framework.log.FrameworkLog"; uses:="",osgi.service; objectClass:List="org.eclipse.osgi.service.datalocation.Location"; type="osgi.user.area"; uses:="org.eclipse.osgi.service.datalocation",osgi.service; objectClass:List="org.eclipse.osgi.service.datalocation.Location"; type="osgi.instance.area"; uses:="org.eclipse.osgi.service.datalocation",osgi.service; objectClass:List="org.eclipse.osgi.service.datalocation.Location"; type="osgi.configuration.area"; uses:="org.eclipse.osgi.service.datalocation",osgi.service; objectClass:List="org.eclipse.osgi.service.datalocation.Location"; type="osgi.install.area"; uses:="org.eclipse.osgi.service.datalocation",osgi.service; objectClass:List="org.eclipse.osgi.service.datalocation.Location"; type="eclipse.home.location"; uses:="org.eclipse.osgi.service.datalocation",osgi.service; objectClass:List="org.eclipse.osgi.service.environment.EnvironmentInfo"; uses:="org.eclipse.osgi.service.environment",osgi.service; objectClass:List="org.osgi.service.packageadmin.PackageAdmin"; uses:="org.osgi.service.packageadmin",osgi.service; objectClass:List="org.osgi.service.startlevel.StartLevel"; uses:="org.osgi.service.startlevel",osgi.service; objectClass:List="org.osgi.service.permissionadmin.PermissionAdmin"; uses:="org.osgi.service.permissionadmin",osgi.service; objectClass:List="org.osgi.service.condpermadmin.ConditionalPermissionAdmin"; uses:="org.osgi.service.condpermadmin",osgi.service; objectClass:List="org.osgi.service.resolver.Resolver"; uses:="org.osgi.service.resolver",osgi.service; objectClass:List="org.eclipse.osgi.service.debug.DebugOptions"; uses:="org.eclipse.osgi.service.debug",osgi.service; objectClass:List="org.eclipse.osgi.service.urlconversion.URLConverter"; uses:="org.eclipse.osgi.service.urlconversion",osgi.service; objectClass:List="org.eclipse.osgi.service.localization.BundleLocalization"; uses:="org.eclipse.osgi.service.localization",osgi.service; objectClass:List="org.eclipse.osgi.service.security.TrustEngine"; uses:="org.eclipse.osgi.service.security",osgi.service; objectClass:List="org.eclipse.osgi.signedcontent.SignedContentFactory"; uses:="org.eclipse.osgi.signedcontent",osgi.service; objectClass:List="org.osgi.service.condition.Condition"; osgi.condition.id="true"; uses:="org.osgi.service.condition",osgi.serviceloader;osgi.serviceloader="org.osgi.framework.connect.ConnectFrameworkFactory";register:="org.eclipse.osgi.launch.EquinoxFactory",osgi.serviceloader;osgi.serviceloader="org.osgi.framework.launch.FrameworkFactory";register:="org.eclipse.osgi.launch.EquinoxFactory", osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0, 1.1, 1.2", osgi.ee; osgi.ee="JRE"; version:List="1.0, 1.1", osgi.ee; osgi.ee="JavaSE"; version:List="1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0",osgi.ee; osgi.ee="JavaSE/compact1"; version:List="1.8, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0",osgi.ee; osgi.ee="JavaSE/compact2"; version:List="1.8, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0",osgi.ee; osgi.ee="JavaSE/compact3"; version:List="1.8, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0"

I would have expected that this is then also provided by the system bundle or is this just how the bundle command works?

@laeubi
Copy link
Member Author

laeubi commented Dec 29, 2024

Looking at the wires command it seem to work and the xslt is bound to the equinox bundle:

Bundle org.eclipse.equinox.transforms.xslt 1.3.200.qualifier:
is wired to:
	 - org.eclipse.osgi 3.23.0.qualifier
	   - because of Import-Package: org.eclipse.osgi.framework.log; version="1.0.0"
	   - because of Import-Package: org.osgi.framework; version="1.3.0"
	   - because of Import-Package: org.osgi.util.tracker; version="1.0.0"
	   - because of Require-Capability: osgi.extender; filter:="(osgi.extender=equinox.transforms.hook)"
	   - because of Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=17))"

so I assume its a glitch in the bundle command.

@laeubi laeubi merged commit 4536baa into eclipse-equinox:master Dec 29, 2024
26 of 27 checks passed
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

Successfully merging this pull request may close these issues.

1 participant