eclipse-sisu / sisu-project

Sisu Inject
https://eclipse.dev/sisu/
Eclipse Public License 2.0
18 stars 15 forks source link

Too eager determination of scanning need for a specific OSGi bundle (Bugzilla Bug 394734) #14

Open mcculls opened 2 years ago

mcculls commented 2 years ago

This issue was created automatically with bugzilla2github

Bugzilla Bug 394734

Date: 2012-11-21 01:59:06 -0500 From: Tuomas Kiviaho <tuomas.kiviaho@iki.fi> To: Project Inbox <sisu-inbox@eclipse.org> CC: gm.romanato@gmail.com, mcculls@gmail.com

Last updated: 2013-11-11 20:25:01 -0500

Comment 2185926

Date: 2012-11-21 01:59:06 -0500 From: Tuomas Kiviaho <tuomas.kiviaho@iki.fi>

SisuActivator.needScanning(Bundle) optimizes the need for scanning of certain bundle in such way that some corner case situations do not get scanned.

1) Fragment doesn't get scanned when it's host doesn't contain annotations as imports 2) Bundle doesn't get scanned if it embeds sisu thus doesn't have annotations as imports

I think that both cases are resolvable using BundleWiring.

Comment 2186466

Date: 2012-11-21 19:26:35 -0500 From: Stuart McCulloch <mcculls@gmail.com>

Yes, it should be possible to support both cases without too much performance impact to the general case (we don't want to do an in-depth eager scan of all bundles if we can avoid it).

BTW, feel free to suggest a patch - either attach it here or submit at https://git.eclipse.org/r/ for review (see http://wiki.eclipse.org/Gerrit)

Comment 2328984

Date: 2013-11-11 20:25:01 -0500 From: Stuart McCulloch <mcculls@gmail.com>

FYI you can now choose your own selection strategy by subclassing BundleScanner and SisuExtender (since Sisu 0.1.0) and using them in your own extender bundle.