Skip to content

Releases: google/wire

v0.6.0

07 Feb 17:43
e57deea
Compare
Choose a tag to compare

New Contributors

Full Changelog: v0.5.0...v0.6.0

0.5.0

26 Jan 02:01
0ac8450
Compare
Choose a tag to compare

New Features

  • Permit specifying build tags for analysis (#252)

Changed

  • Use full go run command in go:generate comment (#268)

Bug Fixes

  • internal/wire: fix panic in objectCache.processExpr (#236)
  • internal/wire: copy doc comment for generated injectors (#254)
  • docs: fix syntax error (#255)
  • docs: fix incorrect generated code in example (#277)

v0.4.0

11 Dec 18:20
Compare
Choose a tag to compare

New Features

  • FieldsOf provides a pointer type to the field as well as the actual field type for pointers to structs (#208)
  • A new --output_file_prefix flag permits changing the name of the outputted file (#192)

Bug Fixes

  • Use go/token to determine whether names are keywords (#203)
  • Wire no longer panics when wire.Struct is given a non-struct first argument (#219)
  • Wire no longer emits invalid code for injectors that return their arguments (#222)
  • Wire's go.mod no longer includes unused dependencies (#228)

v0.3.0

18 Jun 18:22
89cb901
Compare
Choose a tag to compare

Wire version 0.3.0 is the first release we are marking as beta. With this release, we are committing to API stability: we do not intend to make backward-incompatible changes going forward. There are new features and breaking changes in this release, see below for details.

To upgrade to v0.3.0, please upgrade both the Wire command and library.

Breaking Changes

  • github.com/google/wire is now the single canonical import path. Any code still using github.com/google/go-cloud/wire will no longer be recognized. To upgrade: change github.com/google/go-cloud/wire to github.com/google/wire.
  • The second argument of Bind is now a pointer type to match argument types in other marker functions. If you have code like wire.Bind(new(Fooer), new(MyFoo))), the behavior will change. To upgrade: see the guide for how to migrate.

New Features

  • A new marker function FieldsOf to inject fields of a struct directly. See the guide for how to use it.
  • A new marker function Struct for struct providers. This will replace the current struct provider syntax in 1.0, so please upgrade as soon as possible. To upgrade: see the guide.
  • The wire help command will be more useful. You can use wire help to list available commands and their descriptions; you can also use wire help [command] to get more detailed information.
  • A new --header_file flag to gen and diff commands for copying copyright headers.
    Support using a wire:”-” tag to prevent filling certain struct fields.
  • Misc stability and documentation improvements.

v0.2.2

10 May 18:02
Compare
Choose a tag to compare

This release updates the golang.org/x/tools version used in the generator (#122).
There is no change in Wire semantics.

v0.2.1

14 Jan 16:23
Compare
Choose a tag to compare

Bug Fixes

  • Fixed a bug when an interface is bound to a Value, wire would fail to record it as used.
  • Preserve anonymous imports in wire_gen.go (#94)

v0.2.0

03 Dec 23:39
Compare
Choose a tag to compare
  • Add support for variadic argument provider functions and injectors (#61, thanks @shantuo!)
  • diff now exits with status 1 for differences and 2 for errors (#90, thanks @vangent!)