ajjensen13
4d5ab743af
internal/wire: copy doc comment for generated injectors ( #254 )
...
Fixes #244
2020-06-11 08:06:02 -07:00
Aleksandr Razumov
978b7803d3
internal/wire: remove unused method ( #249 )
2020-05-24 08:25:52 -07:00
Dmitry Savintsev
fda113507a
internal/wire: fix panic in objectCache.processExpr ( #236 )
2020-01-10 10:10:27 -08:00
Ross Light
b730ad0fbf
internal/wire: use set to determine which argument to use in zero-call injectors ( #223 )
...
Fixes #222
2019-11-27 15:23:39 -08:00
Ross Light
a5347c86bc
internal/wire: fix crash when giving wire.Struct a bad first argument ( #220 )
2019-11-11 11:06:03 -08:00
Ross Light
0d3b2ebd4a
internal/wire: mark tests as parallelizable ( #218 )
2019-10-25 15:00:03 -07:00
Jose Gil
55a93fac11
cmd: Add --output_file_prefix, which sets a prefix for the output file name "wire_gen.go"
2019-09-25 08:59:48 -07:00
Robert van Gent
c385f07c5d
wire: wire.FieldsOf should not provide pointer to field type for non-pointer structs ( #210 )
2019-09-05 14:17:17 -07:00
Robert van Gent
2b7d1205a1
wire: FieldsOf now provides a pointer to the field type as well as the actual field type ( #209 )
2019-09-03 12:57:57 -07:00
Ariel Mashraki
66f78fc846
internal/wire: replace keyword list with token api ( #203 )
2019-07-16 09:00:00 -07:00
Y.Horie
000df02f3d
parse: use reflect.StructTag to detect wire tags #179 ( #181 )
2019-06-03 14:00:48 -07:00
Robert van Gent
b5d7d7864b
wire: remove color in wire show ( #190 )
...
Fixes #189
2019-05-29 15:02:06 -07:00
Robert van Gent
89bcaa23b9
wire: improve color output to term by using fatih/color ( #186 )
2019-05-29 11:46:31 -07:00
shantuo
cbfca74d8a
wire: support using '-' tag to prevent filling struct fields ( #163 )
2019-05-17 15:56:42 -07:00
Ross Light
7d9ac45bea
internal: fix issues found by shellcheck ( #177 )
2019-05-16 14:54:17 -07:00
Robert van Gent
fe01654174
cmd/wire: add a --header_file flag to the "gen" and "diff" commands ( #175 )
2019-05-16 09:56:42 -07:00
Robert van Gent
d76a979091
wire: use subcommands package, improving help ( #173 )
2019-05-14 12:51:16 -07:00
Robert van Gent
c1be6ec0d8
travis: refresh runtests.sh and Travis config ( #174 )
2019-05-14 11:31:53 -07:00
Jan Hájek
2183ee4806
internal/wire: add package name to unused provider message ( #162 )
...
Fixes #161
2019-05-02 09:57:08 -07:00
shantuo
d079521b6f
wire: reword the deprecation message of struct ( #158 )
2019-04-23 13:27:33 -07:00
shantuo
e9e631cd71
Bind: takes a pointer for the second argument ( #152 )
2019-04-12 23:50:45 -07:00
shantuo
65ae46b7ea
internal/wire: support specifying struct fields to inject ( #147 )
...
Added wire.Struct function and deprecate old form.
Updates #36
2019-03-28 09:00:20 -07:00
shantuo
327f42724c
add FieldsOf to inject fields of a struct directly ( #138 )
2019-03-01 13:52:07 -08:00
Robert van Gent
aa93d6ea07
travis: remove coveralls, only use codecov ( #136 )
2019-02-25 14:35:53 -08:00
Eli Bendersky
f2838ea5ec
admin: removing proxy instructions, script, and .travis.yml reference ( #133 )
2019-02-25 09:23:52 -08:00
Robert van Gent
2f2872ac02
travis: try using codecov ( #131 )
2019-02-15 11:31:52 -08:00
Eli Bendersky
66437afbad
all: add dependency checking to the script Travis runs ( #128 )
...
Dependency checking for CI - ensures a PR doesn't modify our
dependencies without anyone noticing.
Similar to https://github.com/google/go-cloud/pull/1284
Updates #127
2019-02-14 12:48:32 -08:00
Robert van Gent
d810929d49
wire: improve error for a provider set with a binding but no corresponding provider ( #126 )
...
Fixes #113
2019-02-11 08:58:30 -08:00
Robert van Gent
b869afc095
wire/tests: Add a test that defines a ProviderSet with a binding but no ( #121 )
...
corresponding concrete type. The current error message is poor and
should be improved.
2019-02-07 14:36:06 -08:00
Robert van Gent
b1113bfdf1
travis: disable windows, update import path config, and only run goveralls on linux ( #115 )
2019-02-05 16:08:41 -08:00
Ross Light
bee5b6c7c7
internal/wire: remove support for go-cloud import path ( #111 )
2019-01-28 13:57:58 -08:00
Ross Light
3b0186f7df
internal/wire: move field name into ProviderInput ( #104 )
...
Avoids having parallel arrays for conceptually related data.
2019-01-23 11:34:39 -08:00
Ross Light
9a7ae3ba6b
internal/wire/testdata/PkgImport: really add the duplicated import ( #105 )
2019-01-07 14:57:50 -08:00
Ross Light
5b99fcb30b
internal/wire/testdata/PkgImport: add back duplicate import ( #103 )
...
This got removed as part of my gofmt run on #101 .
2019-01-07 14:15:33 -08:00
Kumbirai Tanekha
f285c073b5
internal/wire: copy over anonymous imports ( #101 )
...
Adds Kumbirai Tanekha to A+C.
Fixes #94
2019-01-07 09:04:35 -08:00
shantuo
4243b011bd
internal/wire: factor out common code in solve ( #98 )
...
- Fixed a bug when a interface is bind to a value wire would fail to record it is used.
- Also rename ProvidedType.ConcreteType to Type since it doesn't necessarily returns a concrete type.
Fixes #72
2018-12-14 12:56:01 -08:00
Ross Light
983dc94257
internal/proxy: port script from Go Cloud to create module proxy ( #95 )
...
I have created gs://wire-modules to store the Wire dependencies. I ran
the script in this commit to populate the contents of the GCS bucket and
am updating Travis to point to the new proxy.
Fixes #81
2018-12-10 15:12:36 -08:00
shantuo
ef9bb67152
Support variadic provider and injector functions ( #91 )
...
Fixes #61
2018-12-03 08:30:42 -08:00
Ross Light
90ac48ab7d
Remove more references to Go Cloud ( #88 )
2018-11-30 10:08:58 -08:00
Ross Light
1a5e046395
Remove more references to Go Cloud ( #75 )
2018-11-28 12:51:41 -08:00
Robert van Gent
65eb134857
wire: support multiple packages in Generate ( google/go-cloud#729 )
2018-11-28 11:06:19 -08:00
Robert van Gent
925a11ad0d
wire: add a test for using a function argument as a provider ( google/go-cloud#724 )
2018-11-28 11:02:13 -08:00
Robert van Gent
6ea381b3fe
wire: give wire.Bind access to the arguments to the injector function ( google/go-cloud#715 )
2018-11-28 11:02:13 -08:00
Robert van Gent
67170e739d
wire/tests: add a test for wire.Bind on an injector arg ( google/go-cloud#708 )
2018-11-28 11:02:13 -08:00
Robert van Gent
ebb381989a
wire/tests: add a test for multiple args of the same type to an injector function ( google/go-cloud#706 )
2018-11-28 11:02:13 -08:00
Ross Light
3488a41780
wire: serialize test execution ( google/go-cloud#704 )
2018-11-28 11:00:42 -08:00
Ross Light
30574010a0
Update import path and mirror project docs
2018-11-13 13:16:46 -08:00
Robert van Gent
ded9eb899b
wire: remove trailing CR at end of error about cycles ( google/go-cloud#662 )
2018-11-13 13:16:46 -08:00
Ross Light
282105c273
wire: use go/packages for analysis ( google/go-cloud#623 )
...
Unfortunately, this does come with a ~4x slowdown to Wire, as it is
now pulling source for all transitively depended packages, but not
trimming comments or function bodies. This is due to limitations with
the ParseFile callback in go/packages.
This comes with a single semantic change: when performing analysis, Wire
will now evaluate everything with the wireinject build tag. I updated
the build tags tests accordingly. Prior to this PR, only the packages
directly named by the package patterns would be evaluated with the
wireinject build tag. Dependencies would not have the wireinject build
tag applied. There isn't a way to selectively apply build tags in go/packages,
and there isn't a clear benefit to applying it selectively. Being consistent with
other Go tooling provides greater benefit.
I deleted the vendoring test, as non-top-level vendoring
becomes obsolete with modules.
go/packages now parses comments by default, so now the generated code
includes comments for non-injector declarations.
Fixes google/go-cloud#78
2018-11-13 13:16:46 -08:00
Ross Light
c3ea2961cb
wire: in tests, don't copy want/wire_gen.go into the temporary GOPATH ( google/go-cloud#646 )
...
This does not change the results of the test, but should not be
happening.
2018-11-13 13:16:46 -08:00