lazy singletons in dev

169 views
Skip to first unread message

Joshua S

unread,
Jun 28, 2016, 12:00:11 AM6/28/16
to Dagger Discuss
Is there a graceful way to load the dependency injection graph lazily in development environments only?

This would enable reducing the time to startup when debugging, but keep the nice deterministic startup in production.

Something like guice's createInjector(Stage.DEVELOPMENT, ...)

It isn't clear that dagger's lazy injections are designed for this.

Gregory Kick

unread,
Jun 28, 2016, 1:30:51 PM6/28/16
to Dagger Discuss
Dagger singletons are always initialized lazily.  There is no "eager singleton" like there is in Guice.

--
You received this message because you are subscribed to the Google Groups "Dagger Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dagger-discus...@googlegroups.com.
To post to this group, send email to dagger-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages