Skip to content

Releases: scribd/Weaver

v1.0.4

11 May 18:23
273bc83
Compare
Choose a tag to compare

New features

Improvements

  • Renamed proxy resolvers to align their name with other resolvers (#133). Thanks @MontakOleg!

Bug fixes

  • Fixed parsing of generic types (#137).

v1.0.3

24 Feb 16:30
084b188
Compare
Choose a tag to compare

Bug Fixes

  • Fixed a crash which was happening when no Swift file could be found at the input location (#132). Thanks @happynik!

v1.0.2

27 Jan 17:41
Compare
Choose a tag to compare

Bug Fixes

  • Fixed a bug preventing registration declarations in a public root type (#127, #126).

v1.0.1

20 Dec 21:37
Compare
Choose a tag to compare

New Features

  • Parameters can use weak or container scopes [#90]
  • Closure configuration attribute in order to handle dependency with a closure type [#108]

Bug Fixes

  • Fixed input file listing which was blocking Weaver when trying to use (unsupported) wildcards.
  • Fixed type parser edge cases.

v1.0.0

15 Dec 04:13
Compare
Choose a tag to compare

First stable version of Weaver 🎉

Foundations rework

  • Dependency Graph: The dependency graph representation has been entirely reworked in order to allow for more flexibility at use. Basically, it is now linked using hash keys rather than direct object references.
  • Linker/Inspector: Since the dependency graph changed, the linker & Inspector naturally changed as well. Accessing to data through the graph can now throw, giving a more precise error handling. The visitor algorithm for resolving and building remains fairly the same, but now supports new features, which I will describe a bit below.
  • Generator: The generator has been entirely rewritten using Meta. It also supports new features which I will describe below.

Optimizations

  • Lexer: A cache (LexerCache) has been added in order to avoid SourceKitten to parse the source files every time (~1s for ~30 files). This cache stores one token list per file. A token list is invalidated once its file has changed after it was stored. The format for storing is an optimized JSON where every key is only one or two characters.
  • Generator: The generated Swift code is now relying a lot more on runtime, which brings more flexibility for supporting new features, but also allows Weaver to generate one single dependency container per project instead of one per injectable type
  • Misc optimizations as a result of profiling the binary (~0.5s instead of ~2s for ~30 files when cache is complete).

New Features

  • Property wrapper support. With Swift 5.1, Weaver is now able to detect property wrappers named @Weaver(...) as annotations.
  • Dependencies can now be resolved by name and/or by type.
  • Abstract types can be composite (eg. A & B) and still be resolved correctly as soon as a registration is declared up the tree with a super set abstract type (eg. A & B & C).
  • Some new (more specific) errors are now thrown. Eg. type mismatch, ambiguous type, ambiguous dependency name, etc...
  • Added generation of a stub implementation of the main dependency resolver to facilitate testing. The code is generated in a separated file WeaverTests.swift.
  • Added scope lazy which activates a lazy loading mechanism for a given dependency.
  • Added configuration attribute setter which makes Weaver generate a setter for a given dependency.
  • An injectable type can now reference itself. The stored reference is weak, avoiding retain cycles. The optionality of that reference is abstracted away by Weaver though.

Breaking changes

  • Only one unique file per target (app/tests) can be generated while Weaver used to offer an option to generate multiple files.
  • Naturally, the xcfilelist command has been removed since its necessity was very limited by the fact that only one file is generated now.
  • Detailed resolvers are always on, which means the option doesn't exist anymore.
  • Custom stencil templates aren't supported anymore, since Stencil has been replaced by Meta.
  • The argument --output-path has been renamed to --main-output-path in order to go along with the --test-output-path.

v0.12.3

12 Apr 22:12
2c399d2
Compare
Choose a tag to compare
v0.12.3 Pre-release
Pre-release
  • Added detailed resolvers (#103, #104)
  • Added Swift 5 support (#105)

v0.12.2

21 Feb 18:07
Compare
Choose a tag to compare
v0.12.2 Pre-release
Pre-release
  • Fixed --single-output option (#101).
  • Fixed make install command.

v0.12.1

21 Feb 17:29
Compare
Choose a tag to compare
v0.12.1 Pre-release
Pre-release
  • Fixed error reporting in Xcode (#96).
  • Replaced globbing by a recursive Swift file search (#98/#100).
  • Fixed LICENSE file for Cocoapods (#97).

This version breaks few elements of the command line tool API. Please refer to the migration guide for details.

v0.12.0

16 Feb 17:10
Compare
Choose a tag to compare
v0.12.0 Pre-release
Pre-release
  • No more duplicate module imports when using the flag --single-output (#80/#81).
  • open types support (#83/#85).
  • Renamed command generate to swift and new parameters (#86).
  • YAML or JSON configuration file support (#86).
  • New xcfilelist command to automatically generate input/output xcfilelist files (#84/#86).
  • Fixed installation from archive (#87/#88, #92).
  • CocoaPods support (#93/#95).

This version breaks few elements of the command line tool API. Please refer to the migration guide for details.

v0.11.1

14 Dec 17:50
f075715
Compare
Choose a tag to compare
v0.11.1 Pre-release
Pre-release
  • New option --single_output to make Weaver generate the code in a single file (#77).