Skip to content

Only build services once all the prerequisites are ready

There was a molding system where the DI container would pass the signature object and eventually replace it through injection. This lead to bugs and wasn't very flexible.

For instance, if you wanted to implement a building recipe, say pass arguments to a class dynamically within DI, it would pass the signature and cause issues since the signature wouldn't be at the index placeholder it was expected to be saved at.

Solution: Run the service injection at the ClassBuilder time instead of at class loading, such to ensure services are only built when their dependencies are ready and are only built with the dependencies.