eclipse-sisu / sisu-project

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

Document JSR250 lifecycle support #73

Open kwin opened 1 year ago

kwin commented 1 year ago

The readme should be extended to explicitly mention JSR250 lifecycle support as Guice standalone does not support it (https://github.com/google/guice/issues/62#issuecomment-115452493), but it seems this is supported via https://github.com/eclipse/sisu.inject/blob/a41ab393a0c0e6d8eadf0547763fe80168825b49/org.eclipse.sisu.inject/src/org/eclipse/sisu/bean/LifecycleManager.java.

cstamas commented 1 year ago

The whole doco migration is still ahead of us, agreed, and updating it (as it still refers some Nexus events).

Related: https://github.com/cstamas/sisu.inject/pull/1 my intent here is to provide sisu "native" annotations for lifecycle, for exact reason to avoid pull in dependencies that would make users assume sisu is more than it does 😄 For example, in case of Maven, I'd convert all uses of JSR250 into sisu private annotations, making clear that use of sisu lifecycle is internal detail of Maven alone, it does not provide full CDI functionality or such. Other nice thing would be to stop proliferating (somewhat fixed with https://issues.apache.org/jira/browse/MNG-7045) unwanted dependencies to plugin and extension realms...

In short: I'd avoid calling this JSR250 Lifecycle, but rather Sisu Lifecycle (that MAY support JSR250 if needed -- according to my PR above, will support if annos present, but will STILL WORK if only sisu annos used and LifecycleModule installed).