eclipse-sisu / sisu-project

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

Leverage com.google.inject.spi.ProvisionListener to implement Lifecycle Support #176

Open kwin opened 6 days ago

kwin commented 6 days ago

Currently the lifecycle support in relies on TypeListener for calling the post construct methods (https://github.com/eclipse-sisu/sisu-project/blob/3a8b268b246603fa53b1946aef3a663aa27fc58d/org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/bean/LifecycleModule.java#L86C39-L86C51). Instead one should use https://google.github.io/guice/api-docs/latest/javadoc/com/google/inject/spi/ProvisionListener.html being introduced with Guice 4 (compare with https://github.com/google/guice/issues/62#issuecomment-115452493).

kwin commented 6 days ago

This requires dropping support of Guice 3 (from 2011) and only support Guice 4 or newer (from 2015). Any concerns @mcculls or @cstamas?

cstamas commented 6 days ago

None from me