Documentation for Lifecycle Incorrect?
safi-manar opened this issue · comments
Hi,
I noticed that in the lifecycle startup documentation, Post Injector Startup
occurs before Modules post injector startup
But, in the source code, I see a difference lifecycle sequence in com.twitter.inject.app.App.scala:
def main(): Unit = {
installedModules = loadModules()
installedModules.postInjectorStartup()
postInjectorStartup()
info("Warming up.")
warmup()
beforePostWarmup()
postWarmup()
afterPostWarmup()
installedModules.postWarmupComplete()
...
So, I'm wondering:
- Is the documentation out of date here / is this a mistake?
- Is there a guarantee for future releases that
installedModules.postInjectorStartup()
will precedepostInjectorStartup()
?
@safi-manar thanks for the issue -- the code is correct and documentation just needs to be updated. We don't make guarantees to not change anything in the framework in a future release but we do try to not completely break backwards compatibility without a good reason. FWIW, I don't expect this lifecycle code to change anytime soon. Thanks!
@cacoco Awesome, thank you so much!
@safi-manar the image should be correct now: http://twitter.github.io/finatra/user-guide/getting-started/lifecycle.html#startup. Thanks!