Skip to main content
Remy DI - Dependency Injection for Go
GitHub Go Docs Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Roadmap

Core Foundation

  • Create the injector using Go 1.18 generics (v1.0.0)
  • Allow creating sub-injectors (v1.0.0)
  • Refactor the Storage/Injector retrieval to return an error instead of a bool (v1.2.0, v1.3.0)
  • Remove use of reflect.TypeOf in the injector (v1.2.0, v1.8.0)
    • Implement a method to get the type of element without using reflect.TypeOf
    • Only use reflection if explicitly requested by the user
  • Create an example directory showing how the injector can be used (v1.0.0)
  • Add context-aware resolution (WithContext) (v1.10.0)
    • Works like the current GetWithPairs method, but it will explicitly pass a only the context.Context
  • Create an injector bind generator package using //go:generate comments

Registration & Binding

  • Add RegisterConstructor wrappers to allow registering constructors directly (v1.8.2)
  • Add alias & multi-binding support (v1.8.2)
    • Allow registering a provider under multiple tags
    • Support multiple implementations of the same interface
  • Add RegisterConstructorVariadic wrapper, to allow constructors like NewValue(…T)
  • Add module pattern support (v1.10.0)

Error Handling & Developer Experience

  • Improve error messages
    • Swap error type to include more information about its origin (v1.9.0)
    • Add dependency path traces (e.g., A → B → C failed)
  • Add dependency graph visualization
    • Probably export dependency graph to DOT/Graphviz
    • Add API: GetDependencyGraph(injector remy.Injector)
      • Due to the need of building the graph internally, it must be behind a build tag

Advanced Features

  • Add lifecycle hooks
    • OnRegister, OnResolve callbacks
    • Support hook chaining
  • Provide a fluent builder API
    • Example: CreateInjector().WithLogger(l).WithModules(m1, m2).Build()