di 1.0.0 copy "di: ^1.0.0" to clipboard
di: ^1.0.0 copied to clipboard

discontinued
outdated

Dependency Injection framework

1.0.0 #

Starting with this release DI is following semver.

Bug Fixes #

  • Key: fixed bugs caused by hashCode collisions, and docs cleanup (f673267d, #94)
  • circular deps: Improve error messages (4ccdb1f0)

Performance Improvements #

  • Key: don't use Map.putIfAbsent -- too slow (0930b377)
  • injector: use separate structures to allow compiler optimizations (f7b8af92)

0.0.40 #

Bug Fixes #

  • module: correctly handle null value binding (ada47b36, #93)

0.0.39 #

Bug Fixes #

  • transformer: Exception on parameterized types with implicit constructors (ed0a2b02)

Features #

Breaking Changes #

Module has a new API:

new Module()
    ..bind(Foo, toValue: new Foo())
    ..bind(Foo, toFactory: (i) => new Foo())
    ..bind(Foo, toImplementation: FooImpl);

Old methods type, value and factory were deprecated and will be removed in the next release.

0.0.38 #

Fixes #

  • key: made Key part of di.dart again (fe390ddf)

0.0.37 #

Combined with previous release (0.0.36) injector is on average 2x faster.

Before:

VM:
DynamicInjectorBenchmark(RunTime): 231.93784065870346 us.
StaticInjectorBenchmark(RunTime): 107.05491917353602 us.

dart2js:
DynamicInjectorBenchmark(RunTime): 2175 us.
StaticInjectorBenchmark(RunTime): 765.1109410864575 us.

After:

VM:
DynamicInjectorBenchmark(RunTime): 156.3721657544957 us.
StaticInjectorBenchmark(RunTime): 54.246114622040196 us.

dart2js:
DynamicInjectorBenchmark(RunTime): 1454.5454545454545 us.
StaticInjectorBenchmark(RunTime): 291.9281856663261 us.

Bug Fixes #

  • warnings: refactored injector to fix analyzer warnings (7d374b19)

Performance Improvements #

  • injector:
    • Make resolving a linked-list stored with the frame (c588e662)
    • Do not closurize methods. (5f47cbd0)
    • Do not check the circular dependency until we are 30 deep. (1dedf6e3)
    • Track resolving keys with the frame. (17aeb4df)
  • resolvedTypes: minor performance inmprovement in resolvedTypes (ba16bde5)

0.0.36 #

Performance Improvements #

  • injector:
    • skip _checkKeyConditions in dart2js (6763552a)
    • +29%. Use an array for type lookup instead of a map.
0
likes
0
pub points
37%
popularity

Publisher

unverified uploader

Dependency Injection framework

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, barback, code_transformers, path

More

Packages that depend on di