Update Provider.Out to be a slice of provided types, and keep track
of the provided concrete type in ProviderSet.providerMap, to more
clearly model-named struct providers (which provide both the struct
type and a pointer to the struct type).
Fixesgoogle/go-cloud#325.
* Add wire.InterfaceValue, required instead of wire.Value if the value is an interface value.
* Update guestbook sample to use InterfaceValue where appropriate.
* Remove unnecessary ok := true
* Addressing comments from code review.
In the internal package, this expands the wire.Load function to run
the same solver as wire.Generate would on any injector function. For
completeness, I also print the injector functions in the gowire show
command.
A subsequent PR will add this as a step to Go Cloud CI.
Updates google/go-cloud#30
We should be instructing users to run stable things, and more
adventurous folks can adapt to use Go modules. I just ran the test suite
locally from a `go get` and it compiled and ran fine.
Updates google/go-cloud#78
Updates google/go-cloud#208
This changes both Generate and Load to try to advance as far as possible
while collecting errors. A small helper type, errorCollector, is used to
make control flow easier to read.
Fixesgoogle/go-cloud#5
This represents no functional change, it purely changes the signature
used for functions that can possibly return multiple errors. A
follow-up commit will change the control flow to proceed in the face
of errors.
5cfd0141dd95acd1a98a1b7f6de5b8b304077634 worked correctly with
absolute import paths, but would fail with relative import paths
(most commonly when passing "." in the default invocation of
gowire). This commit introduces test infrastructure to allow
relative import paths to be given as test inputs, along with a test
case that addresses the regression.
This was introduced in 7d83fb8532c1455d4e81b587f31d090320f5eb9f and is
surprisingly not caught by the race detector. I suspect that the testing
package makes it not a strict data race, but the result is still
undefined.
out.txts that start with "ERROR" can now include substrings to assert
exist in the error messages, one per line. This gives a very
coarse-grained way of testing for error message quality. It is not a
substitute for manual verification, but gives a "good enough" sanity
check that relevant details are reported.
Updates google/go-cloud#5
Primary reason is to make it easier to allow the process to continue and
collect errors. This has the side-effect of allowing larger depth graphs
since the solver no longer pushes Go stack frames.
Updates google/go-cloud#5
Updated the call sites to allow multiple errors to be returned from
the package. Load is now permitted to return partial success.
Updates google/go-cloud#5
Idea originally mentioned in google/go-cloud#29. This means that any provider set
loaded must not have cycles, which is stricter than before. The cycle
error message now gives full detail on what caused the cycle.
Summary of changes:
- Rewrote introduction (fixesgoogle/go-cloud#81).
- Simplified `go generate` explanation by automatically adding the
comment line to the output.
- Removed mentions of Dagger. Wire stands enough on its own now, but
Dagger's influence lives on in our minds.
- Moved best practices to bottom and removed provider set grouping
guidance.