Skip to content

Releases: matzefriedrich/parsley

parsley v0.8.2

29 Aug 21:02
b8d5f56
Compare
Choose a tag to compare
parsley v0.8.2 Pre-release
Pre-release

This release introduces the parsley-cli utility to extend the library's capabilities beyond what reflection alone can achieve and to outpace the limitations of the statically typed language. This version focuses on empowering developers with new tools for code generation, particularly around proxy and decorator patterns.

Changes

New CLI Tool: This version introduces parsley-cli, a powerful command-line utility designed to enhance the Parsley ecosystem. With this tool, developers can generate code that integrates seamlessly with Parsley’s dependency injection framework.

  • init Command: The init command bootstraps a new Parsley application, generating essential files such as main.go and application.go. These files provide the minimum setup required to kick-start a dependency injection-enabled application.

  • generate proxy Command: The generate proxy command allows developers to create proxy types that can be extended via MethodInterceptor objects. These generated proxies can serve as powerful tools for implementing cross-cutting concerns like logging, monitoring, or transaction management in a clean and modular way.

parsley v0.7.1

09 Aug 23:04
9e92fb6
Compare
Choose a tag to compare
parsley v0.7.1 Pre-release
Pre-release

This version addresses issues with resolving and injecting services as lists.

Changes

  • Adds the RegisterList[T] method to enable the resolver to inject lists of services. While resolving lists of a specific service type was already possible by the ResolveRequiredServices[T] method, the consumption of arrays in constructor functions requires an explicit registration. The list registration can be mixed with named service registrations.

  • Adds fmt.Stringer implementations to registration types to improve the debugging experience. It also fixes the handling of types reflected from anonymous functions.

  • Extracts some registry and resolver errors.

parsley v0.7.0

04 Aug 21:17
91ab986
Compare
Choose a tag to compare
parsley v0.7.0 Pre-release
Pre-release

Changes

  • Adds the RegisterLazy[T] method to register a lazy service factory. Use the type Lazy[T] to consume a lazy service dependency and call its Value() T method to request the actual service instance. The lazy instance will create and cache the service instance upon the first request. Each subsequent call to the Value method will return the cached value.

parsley v0.6.1

30 Jul 18:43
659dc58
Compare
Choose a tag to compare
parsley v0.6.1 Pre-release
Pre-release

Changes

  • Automatically registers services with a name automatically with the desired lifetime scope to resolve them also as a list of services (like services without a name).
  • Changes the resolver so that temporary registrations are selected first (and shadow permanent registrations). The behavior can now generally be leveraged in ResolverOptionsFunc as well, to shadow other registrations when resolving instances via ResolveWithOptions.

parsley v0.6.0

26 Jul 22:37
76ea475
Compare
Choose a tag to compare
parsley v0.6.0 Pre-release
Pre-release

Changes

  • Registration of named services is now supported; use the RegisterNamed[T] method to register a factory for services implementing the same interface and resolve them by name via a func(string) T factory method.
  • The registration and activation of pointer types is now possible (to not enforce interfaces as abstractions).
  • Parsley now has a service activation module that can create instances of unregistered types. Use the Activate[T] method to invoke a constructor function with resolved dependencies.

Fixes

  • This version fixes a bug in the detectCircularDependency helper function that could cause the resolver to get stuck in an infinite loop.

parsley v0.5.0

15 Jul 23:27
d48950c
Compare
Choose a tag to compare
parsley v0.5.0 Pre-release
Pre-release

Changes

  • The service registry now accepts multiple registrations for the same interface.
  • The resolver has been extended to handle multiple service registrations per interface type.

parsley v0.4.0

13 Jul 20:54
7474ef2
Compare
Choose a tag to compare
parsley v0.4.0 Pre-release
Pre-release

Changes

  • Registration of factory functions is now supported, adding the ability to create instances of services based on input parameters provided at runtime.
  • New sub-packages for registration and resolving have been added. Many types that support the package's internal functionality have been moved to internal.
  • Integration tests are moved to the internal package, making it easier to navigate the repository.

parsley v0.3.0

12 Jul 00:17
037cf96
Compare
Choose a tag to compare
parsley v0.3.0 Pre-release
Pre-release

Changes

  • Service registrations can be bundled in a ModuleFunc to register related types as a unit.
  • The ServiceRegistry now accepts object instances as singleton service registrations.
  • The ResolveRequiredService[T] convenience function can resolve and safe-cast objects.
  • The resolver instance registers with the registry to inject the Resolver object into the factory and constructor methods.
  • The resolver can now accept instances of non-registered types via the ResolveWithOptions[T] method.
  • The ServiceRegistry has new methods for creating linked and scoped registry objects (which share the same ServiceIdSequence). Scoped registries inherit all parent service registrations, while linked registries are empty.

parsley v0.2.0

11 Jul 09:26
2f62444
Compare
Choose a tag to compare
parsley v0.2.0 Pre-release
Pre-release

Changes

  • Registry rejects non-interface types
  • The resolver can now detect circular dependencies

Fixes

  • Fixes error types
  • Fixes non-interface type error