Releases: sarulabs/di
New ParentContainer function
Major speed improvements
It also adds new features (Def as Get parameter, types, ...) but mostly stays compatible with the previous version.
The biggest change is the Container
type. It used to be an interface, but it is now a struct.
The documentation was reorganized.
Improve error messages in recovered panic
Also use %+v to print errors in when panic are recovered.
Improve error messages
Use %+v
to print errors (instead of %s
) to include things like stack traces if the type of the error supports it.
Add Builder.Set method
v2.4.0 Add the Set method to the builder (#19)
Unshared objects
Add unshared objects.
Service override
It is now possible to override a service in the Builder.
Fix closing order
This release fixes two bugs :
- The objects were closed in a random order. It was possible to have an object with a closed dependency. The objects are now closed in the right order. The dependencies are closed after the objects using them.
- The second bug was created in the last release. The Close function could be called on an object that was being built. In this case it was not possible to cast the object given to the Close function.
Fix concurrent build calls
Two requests could build the same object in the app scope.
The first one was used by the first request, while the second one was used by all the other requests. The first one was forgotten and never closed. It could happen if the first two Get calls were done at the same time or/and if the Build function took some time to be executed.
Definition tags and go modules
- put back tags in service definitions
- add support for go modules