You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ContainerInstance): disable eager services by default
Eager services are harder to test, and
make application behaviour more brittle.
As a result, I do personally discourage
using them.
Therefore, by default they are now disabled.
This will need more testing.
Some further remarks below:
Eager loading is generally discouraged, as it makes testing harder
and makes the application more confusing to work with.
For instance, see:
[typestack/typedi#380](typestack/typedi#380).
Consider an example of a DatabaseService with eager loading enabled.
Once imported, database connections and more will
immediately start taking place.
In many cases, this will be unexpected and will
ultimately be an unwanted side effect.
Therefore, we place the eager loading functionality
behind a toggleable option,
which must be enabled prior to any eager loading
strategies taking place.
0 commit comments