Diff of the two buildlogs: -- --- b1/build.log 2023-04-21 05:29:16.872318339 +0000 +++ b2/build.log 2023-04-21 05:32:42.539198081 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Thu Apr 20 17:25:23 -12 2023 -I: pbuilder-time-stamp: 1682054723 +I: Current time: Fri May 24 01:52:20 +14 2024 +I: pbuilder-time-stamp: 1716465140 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/bookworm-reproducible-base.tgz] I: copying local configuration @@ -16,7 +16,7 @@ I: copying [./golang-github-google-wire_0.5.0.orig.tar.gz] I: copying [./golang-github-google-wire_0.5.0-2.debian.tar.xz] I: Extracting source -gpgv: Signature made Tue Apr 12 01:31:39 2022 -12 +gpgv: Signature made Wed Apr 13 03:31:39 2022 +14 gpgv: using RSA key 142421B19AD4A95996F95072EA2500B412C59ACF gpgv: issuer "foka@debian.org" gpgv: Can't check signature: No public key @@ -29,52 +29,84 @@ dpkg-source: info: applying 0002-update-record-replay-files-for-go1.18.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/31868/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/15451/tmp/hooks/D01_modify_environment starting +debug: Running on codethink13-arm64. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 May 24 01:52 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/15451/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/15451/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='arm64' - DEBIAN_FRONTEND='noninteractive' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="15" [3]="1" [4]="release" [5]="aarch64-unknown-linux-gnu") + BASH_VERSION='5.2.15(1)-release' + BUILDDIR=/build + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=arm64 + DEBIAN_FRONTEND=noninteractive DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=8' - DISTRIBUTION='bookworm' - HOME='/var/lib/jenkins' - HOST_ARCH='arm64' + DIRSTACK=() + DISTRIBUTION=bookworm + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/var/lib/jenkins + HOSTNAME=i-capture-the-hostname + HOSTTYPE=aarch64 + HOST_ARCH=arm64 IFS=' ' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='31868' - PS1='# ' - PS2='> ' + LANG=C + LANGUAGE=nl_BE:nl + LC_ALL=C + MACHTYPE=aarch64-unknown-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=15451 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.ycB1yq7x/pbuilderrc_76mm --distribution bookworm --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bookworm-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.ycB1yq7x/b1 --logfile b1/build.log golang-github-google-wire_0.5.0-2.dsc' - SUDO_GID='117' - SUDO_UID='110' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - USERNAME='root' - _='/usr/bin/systemd-run' - http_proxy='http://192.168.101.16:3128' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.ycB1yq7x/pbuilderrc_WhuQ --distribution bookworm --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bookworm-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.ycB1yq7x/b2 --logfile b2/build.log --extrapackages usrmerge golang-github-google-wire_0.5.0-2.dsc' + SUDO_GID=117 + SUDO_UID=110 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + USERNAME=root + _='I: set' + http_proxy=http://192.168.101.16:3128 I: uname -a - Linux codethink12-arm64 4.15.0-209-generic #220-Ubuntu SMP Tue Mar 21 19:52:44 UTC 2023 aarch64 GNU/Linux + Linux i-capture-the-hostname 4.15.0-209-generic #220-Ubuntu SMP Tue Mar 21 19:52:44 UTC 2023 aarch64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Apr 17 22:25 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/31868/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 May 23 06:50 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/15451/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -170,7 +202,7 @@ Get: 44 http://deb.debian.org/debian bookworm/main arm64 golang-golang-x-text-dev all 0.7.0-1 [3863 kB] Get: 45 http://deb.debian.org/debian bookworm/main arm64 golang-golang-x-net-dev all 1:0.7.0+dfsg-1 [731 kB] Get: 46 http://deb.debian.org/debian bookworm/main arm64 golang-golang-x-tools-dev all 1:0.5.0+ds-1 [1469 kB] -Fetched 100 MB in 2s (60.3 MB/s) +Fetched 100 MB in 2s (58.0 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package sensible-utils. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19616 files and directories currently installed.) @@ -368,8 +400,17 @@ Writing extended state information... Building tag database... -> Finished parsing the build-deps +Reading package lists... +Building dependency tree... +Reading state information... +usrmerge is already the newest version (35). +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. I: Building the package -I: Running cd /build/golang-github-google-wire-0.5.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../golang-github-google-wire_0.5.0-2_source.changes +I: user script /srv/workspace/pbuilder/15451/tmp/hooks/A99_set_merged_usr starting +Re-configuring usrmerge... +I: user script /srv/workspace/pbuilder/15451/tmp/hooks/A99_set_merged_usr finished +hostname: Temporary failure in name resolution +I: Running cd /build/golang-github-google-wire-0.5.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../golang-github-google-wire_0.5.0-2_source.changes dpkg-buildpackage: info: source package golang-github-google-wire dpkg-buildpackage: info: source version 0.5.0-2 dpkg-buildpackage: info: source distribution unstable @@ -388,28 +429,28 @@ dh_auto_configure -O--builddirectory=_build -O--buildsystem=golang dh_auto_build -O--builddirectory=_build -O--buildsystem=golang cd _build && go install -trimpath -v -p 8 github.com/google/wire github.com/google/wire/cmd/wire github.com/google/wire/internal/wire +internal/goos +github.com/google/wire internal/goarch -internal/unsafeheader internal/goexperiment -internal/goos +internal/unsafeheader internal/race -github.com/google/wire -runtime/internal/syscall internal/cpu +runtime/internal/syscall +sync/atomic internal/abi runtime/internal/math -sync/atomic -internal/itoa runtime/internal/sys +internal/itoa encoding math/bits unicode/utf8 -unicode unicode/utf16 +unicode internal/goversion +runtime/internal/atomic internal/bytealg math -runtime/internal/atomic runtime internal/reflectlite sync @@ -419,72 +460,72 @@ sort internal/oserror io -strconv -path internal/safefilepath +path +strconv syscall container/heap golang.org/x/mod/semver -strings bytes -text/tabwriter hash +strings +text/tabwriter crypto reflect go/build/constraint bufio regexp/syntax -time internal/syscall/execenv internal/syscall/unix +time regexp context -internal/poll io/fs +internal/poll os internal/fmtsort encoding/binary encoding/base64 crypto/md5 -fmt -path/filepath internal/godebug internal/lazyregexp io/ioutil +path/filepath +fmt os/exec internal/goroot -go/token -flag go/doc/comment golang.org/x/sys/execabs +go/token +flag internal/buildcfg -math/big encoding/json +math/big golang.org/x/tools/internal/event/label log github.com/pmezard/go-difflib/difflib golang.org/x/tools/internal/event/keys go/scanner github.com/google/subcommands -golang.org/x/tools/internal/event/core go/ast +golang.org/x/tools/internal/event/core golang.org/x/tools/internal/event golang.org/x/tools/internal/gocommand golang.org/x/tools/internal/packagesinternal +go/constant go/internal/typeparams go/doc go/printer -go/constant go/parser golang.org/x/tools/internal/pkgbits go/format go/build go/types +golang.org/x/tools/internal/typeparams golang.org/x/tools/go/internal/packagesdriver golang.org/x/tools/internal/typesinternal -golang.org/x/tools/internal/typeparams -golang.org/x/tools/go/ast/astutil golang.org/x/tools/internal/gcimporter +golang.org/x/tools/go/ast/astutil golang.org/x/tools/go/types/typeutil golang.org/x/tools/go/gcexportdata golang.org/x/tools/go/packages @@ -637,15 +678,54 @@ === PAUSE TestWire/Varargs === CONT TestWire/BindInjectorArg === CONT TestWire/InterfaceValueNotEnoughArgs -=== CONT TestWire/Varargs === CONT TestWire/FieldsOfValueStruct -=== CONT TestWire/InterfaceBinding -=== CONT TestWire/VarValue +=== CONT TestWire/Varargs === CONT TestWire/InterfaceValueInvalidArg0 -=== CONT TestWire/InjectorMissingError +=== CONT TestWire/VarValue +=== CONT TestWire/InterfaceValueDoesntImplement +=== CONT TestWire/EmptyVar + wire_test.go:108: /tmp/wire_test3614217564/src/example.com/foo/wire.go:24:13: var example.com/foo.myFakeSet struct{} is not a provider or a provider set +=== CONT TestWire/FieldsOfImportedStruct +=== CONT TestWire/BindInjectorArg + wire_test.go:164: wire_gen.go: + // Code generated by Wire. DO NOT EDIT. + + //go:generate go run github.com/google/wire/cmd/wire + //go:build !wireinject + // +build !wireinject + + package main + + // Injectors from wire.go: + + func inject(foo Foo) *Bar { + bar := NewBar(foo) + return bar + } +=== CONT TestWire/FieldsOfStructPointer +=== CONT TestWire/InterfaceValueDoesntImplement + wire_test.go:108: /tmp/wire_test1105517371/src/example.com/foo/wire.go:26:13: string does not implement io.Reader +=== CONT TestWire/FieldsOfStructDoNotProvidePtrToField === CONT TestWire/InterfaceValueInvalidArg0 - wire_test.go:108: /tmp/wire_test2276520479/src/example.com/foo/wire.go:25:13: first argument to InterfaceValue must be a pointer to an interface type; found string -=== CONT TestWire/ValueIsStruct + wire_test.go:108: /tmp/wire_test1574467204/src/example.com/foo/wire.go:25:13: first argument to InterfaceValue must be a pointer to an interface type; found string +=== CONT TestWire/FieldsOfStruct +=== CONT TestWire/Varargs + wire_test.go:164: wire_gen.go: + // Code generated by Wire. DO NOT EDIT. + + //go:generate go run github.com/google/wire/cmd/wire + //go:build !wireinject + // +build !wireinject + + package main + + // Injectors from wire.go: + + func injectedMessage(t title, lines ...string) string { + string2 := provideMessage(lines...) + return string2 + } +=== CONT TestWire/ExportedValueDifferentPackage === CONT TestWire/FieldsOfValueStruct wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -691,7 +771,7 @@ svc := newBazService() fmt.Println(svc.String()) } -=== CONT TestWire/ValueIsInterfaceValue +=== CONT TestWire/FieldsOfCycle === CONT TestWire/VarValue wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -712,11 +792,13 @@ var ( _wireStringValue = msg ) -=== CONT TestWire/ValueFromFunctionScope -=== CONT TestWire/InjectorMissingError - wire_test.go:108: /tmp/wire_test4206592168/src/example.com/foo/wire.go:23:1: inject injectFoo: provider for example.com/foo.Foo returns error but injection not allowed to fail -=== CONT TestWire/ValueConversion -=== CONT TestWire/InterfaceBinding +=== CONT TestWire/BuildTagsAllPackages +=== CONT TestWire/InterfaceValueNotEnoughArgs + wire_test.go:108: /tmp/wire_test4264690398/src/example.com/foo/wire.go:25:38: not enough arguments in call to wire.InterfaceValue + have (string) + want (interface{}, interface{}) +=== CONT TestWire/DocComment +=== CONT TestWire/FieldsOfImportedStruct wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -726,14 +808,39 @@ package main + import ( + "example.com/bar" + "example.com/baz" + "example.com/foo" + "fmt" + ) + // Injectors from wire.go: - func injectFooer() Fooer { - bar := provideBar() - return bar + func newBazService(config *baz.Config) *baz.Service { + fooConfig := config.Foo + service := foo.New(fooConfig) + barConfig := config.Bar + barService := bar.New(barConfig, service) + bazService := &baz.Service{ + Foo: service, + Bar: barService, + } + return bazService } -=== CONT TestWire/ValueChain -=== CONT TestWire/BindInjectorArg + + // wire.go: + + func main() { + cfg := &baz.Config{ + Foo: &foo.Config{1}, + Bar: &bar.Config{2}, + } + svc := newBazService(cfg) + fmt.Println(svc.String()) + } +=== CONT TestWire/Cycle +=== CONT TestWire/FieldsOfStruct wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -745,12 +852,13 @@ // Injectors from wire.go: - func inject(foo Foo) *Bar { - bar := NewBar(foo) - return bar + func injectedMessage() string { + s := provideS() + string2 := s.Foo + return string2 } -=== CONT TestWire/UnusedProviders -=== CONT TestWire/Varargs +=== CONT TestWire/CopyOtherDecls +=== CONT TestWire/BuildTagsAllPackages wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -762,17 +870,16 @@ // Injectors from wire.go: - func injectedMessage(t title, lines ...string) string { - string2 := provideMessage(lines...) + func injectedMessage() string { + string2 := _wireStringValue return string2 } -=== CONT TestWire/UnexportedValue -=== CONT TestWire/InterfaceValueNotEnoughArgs - wire_test.go:108: /tmp/wire_test2655481954/src/example.com/foo/wire.go:25:38: not enough arguments in call to wire.InterfaceValue - have (string) - want (interface{}, interface{}) -=== CONT TestWire/UnexportedStruct -=== CONT TestWire/ValueIsStruct + + var ( + _wireStringValue = "Hello, World!" + ) +=== CONT TestWire/Cleanup +=== CONT TestWire/ExportedValueDifferentPackage wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -782,27 +889,32 @@ package main + import ( + "os" + ) + // Injectors from wire.go: - func injectFoo() Foo { - foo := _wireFooValue - return foo + func injectedFile() *os.File { + file := _wireFileValue + return file } var ( - _wireFooValue = Foo{X: 42} + _wireFileValue = os.Stdout ) -=== CONT TestWire/TwoDeps -=== CONT TestWire/ValueIsInterfaceValue - wire_test.go:108: /tmp/wire_test3506605485/src/example.com/foo/wire.go:27:13: argument to Value may not be an interface value (found io.Reader); use InterfaceValue instead -=== CONT TestWire/StructWithPreventTag -=== CONT TestWire/ValueFromFunctionScope - wire_test.go:108: /tmp/wire_test2033589055/src/example.com/foo/wire.go:23:1: inject injectBar: value int can't be used: f is not declared in package scope -=== CONT TestWire/StructPointer -=== CONT TestWire/UnexportedValue - wire_test.go:108: /tmp/wire_test18864840/src/example.com/foo/wire.go:24:1: inject injectedMessage: value string can't be used: uses unexported identifier privateMsg -=== CONT TestWire/StructNotAStruct -=== CONT TestWire/ValueConversion +=== CONT TestWire/Chain +=== CONT TestWire/FieldsOfCycle + wire_test.go:108: /tmp/wire_test284400543/src/example.com/foo/wire.go:23:1: cycle for example.com/foo.Bar: + example.com/foo.Bar (example.com/foo.provideBar) -> + example.com/foo.Foo (example.com/foo.provideFoo) -> + example.com/foo.Baz (example.com/foo.Bar.Bz) -> + example.com/foo.Bar +=== CONT TestWire/ReservedKeywords +=== CONT TestWire/FieldsOfStructDoNotProvidePtrToField + wire_test.go:108: /tmp/wire_test3159580679/src/example.com/foo/wire.go:23:1: inject injectedMessagePtr: no provider found for *string, output of injector +=== CONT TestWire/ValueIsStruct +=== CONT TestWire/FieldsOfStructPointer wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -814,16 +926,19 @@ // Injectors from wire.go: - func injectedMessage() Foo { - foo := _wireFooValue - return foo + func injectedMessage() string { + s := provideS() + string2 := s.Foo + return string2 } - var ( - _wireFooValue = Foo("Hello, World!") - ) -=== CONT TestWire/Struct -=== CONT TestWire/ValueChain + func injectedMessagePtr() *string { + s := provideS() + string2 := &s.Foo + return string2 + } +=== CONT TestWire/ValueIsInterfaceValue +=== CONT TestWire/DocComment wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -835,27 +950,61 @@ // Injectors from wire.go: - func injectFooBar() FooBar { - foo := _wireFooValue - fooBar := provideFooBar(foo) - return fooBar + /* blockComment returns Foo and has a /*- style doc comment */ + func blockComment() *Foo { + foo := &Foo{} + return foo } - var ( - _wireFooValue = Foo(41) + // lineComment returns Bar and has a //- style doc comment + func lineComment() *Bar { + bar := &Bar{} + return bar + } +=== CONT TestWire/ValueFromFunctionScope +=== CONT TestWire/Cycle + wire_test.go:108: /tmp/wire_test1331912579/src/example.com/foo/wire.go:23:1: cycle for example.com/foo.Bar: + example.com/foo.Bar (example.com/foo.provideBar) -> + example.com/foo.Foo (example.com/foo.provideFoo) -> + example.com/foo.Baz (example.com/foo.provideBaz) -> + example.com/foo.Bar +=== CONT TestWire/ValueConversion +=== CONT TestWire/CopyOtherDecls + wire_test.go:164: wire_gen.go: + // Code generated by Wire. DO NOT EDIT. + + //go:generate go run github.com/google/wire/cmd/wire + //go:build !wireinject + // +build !wireinject + + package main + + import ( + "fmt" ) -=== CONT TestWire/ReturnError + + // Injectors from foo.go: + + func injectedMessage() string { + string2 := provideMessage() + return string2 + } + + // foo.go: + + func main() { + fmt.Println(injectedMessage()) + } + + // provideMessage provides a friendly user greeting. + func provideMessage() string { + return "Hello, World!" + } +=== CONT TestWire/ValueChain +=== CONT TestWire/ValueFromFunctionScope + wire_test.go:108: /tmp/wire_test2084840392/src/example.com/foo/wire.go:23:1: inject injectBar: value int can't be used: f is not declared in package scope === CONT TestWire/UnusedProviders - wire_test.go:108: /tmp/wire_test1614160571/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused provider set "unusedSet" - wire_test.go:108: /tmp/wire_test1614160571/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused provider "main.provideUnused" - wire_test.go:108: /tmp/wire_test1614160571/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused value of type string - wire_test.go:108: /tmp/wire_test1614160571/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused interface binding to type example.com/foo.Fooer - wire_test.go:108: /tmp/wire_test1614160571/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused field "example.com/foo.S".Cfg -=== CONT TestWire/ReturnArgumentAsInterface -=== CONT TestWire/UnexportedStruct - wire_test.go:108: /tmp/wire_test2375376440/src/example.com/foo/wire.go:26:17: foo not exported by package bar === CONT TestWire/ReservedKeywords -=== CONT TestWire/TwoDeps wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -867,17 +1016,20 @@ // Injectors from wire.go: - func injectFooBar() FooBar { - foo := provideFoo() - bar := provideBar() - fooBar := provideFooBar(foo, bar) - return fooBar + func injectInterface() Interface { + select2 := provideSelect() + mainInterface := provideInterface(select2) + return mainInterface } -=== CONT TestWire/RelativePkg -=== CONT TestWire/StructWithPreventTag - wire_test.go:108: /tmp/wire_test1467940052/src/example.com/foo/foo.go:45:2: "mu" is prevented from injecting by wire -=== CONT TestWire/ProviderSetBindingMissingConcreteType -=== CONT TestWire/ReturnError + + // wire.go: + + // Wire tries to disambiguate the variable "select" by prepending + // the package name; this package-scoped variable conflicts with that + // and forces a different name. + var mainSelect = 0 +=== CONT TestWire/UnexportedValue +=== CONT TestWire/Chain wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -889,15 +1041,13 @@ // Injectors from wire.go: - func injectFoo() (Foo, error) { - foo, err := provideFoo() - if err != nil { - return 0, err - } - return foo, nil + func injectFooBar() FooBar { + foo := provideFoo() + fooBar := provideFooBar(foo) + return fooBar } -=== CONT TestWire/PkgImport -=== CONT TestWire/ReturnArgumentAsInterface +=== CONT TestWire/UnexportedStruct +=== CONT TestWire/ValueIsStruct wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -907,17 +1057,21 @@ package main - import ( - "fmt" - ) - // Injectors from wire.go: - func injectStringer(s MyString) fmt.Stringer { - return s + func injectFoo() Foo { + foo := _wireFooValue + return foo } -=== CONT TestWire/PartialCleanup -=== CONT TestWire/Struct + + var ( + _wireFooValue = Foo{X: 42} + ) +=== CONT TestWire/TwoDeps +=== CONT TestWire/ValueIsInterfaceValue + wire_test.go:108: /tmp/wire_test1841591983/src/example.com/foo/wire.go:27:13: argument to Value may not be an interface value (found io.Reader); use InterfaceValue instead +=== CONT TestWire/StructWithPreventTag +=== CONT TestWire/Cleanup wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -929,24 +1083,18 @@ // Injectors from wire.go: - func injectFooBar() FooBar { - foo := provideFoo() - bar := provideBar() - fooBar := FooBar{ - Foo: foo, - Bar: bar, - } - return fooBar - } - - func injectPartFooBar() FooBar { - foo := provideFoo() - fooBar := FooBar{ - Foo: foo, + func injectBar() (*Bar, func()) { + foo, cleanup := provideFoo() + bar, cleanup2 := provideBar(foo) + return bar, func() { + cleanup2() + cleanup() } - return fooBar } -=== CONT TestWire/NoopBuild +=== CONT TestWire/StructPointer +=== CONT TestWire/UnexportedValue + wire_test.go:108: /tmp/wire_test175228545/src/example.com/foo/wire.go:24:1: inject injectedMessage: value string can't be used: uses unexported identifier privateMsg +=== CONT TestWire/StructNotAStruct === CONT TestWire/StructPointer wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -973,11 +1121,11 @@ empty := &Empty{} return empty } -=== CONT TestWire/NoInjectParamNames -=== CONT TestWire/StructNotAStruct - wire_test.go:108: /tmp/wire_test4038816635/src/example.com/foo/wire.go:24:13: first argument to Struct must be a pointer to a named struct; found **example.com/foo.A -=== CONT TestWire/NoImplicitInterface -=== CONT TestWire/ReservedKeywords +=== CONT TestWire/Struct +=== CONT TestWire/UnexportedStruct + wire_test.go:108: /tmp/wire_test156344907/src/example.com/foo/wire.go:26:17: foo not exported by package bar +=== CONT TestWire/ReturnError +=== CONT TestWire/ValueChain wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -989,20 +1137,17 @@ // Injectors from wire.go: - func injectInterface() Interface { - select2 := provideSelect() - mainInterface := provideInterface(select2) - return mainInterface + func injectFooBar() FooBar { + foo := _wireFooValue + fooBar := provideFooBar(foo) + return fooBar } - // wire.go: - - // Wire tries to disambiguate the variable "select" by prepending - // the package name; this package-scoped variable conflicts with that - // and forces a different name. - var mainSelect = 0 -=== CONT TestWire/NiladicValue -=== CONT TestWire/RelativePkg + var ( + _wireFooValue = Foo(41) + ) +=== CONT TestWire/ReturnArgumentAsInterface +=== CONT TestWire/TwoDeps wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1014,15 +1159,24 @@ // Injectors from wire.go: - func injectedMessage() string { - string2 := provideMessage() - return string2 + func injectFooBar() FooBar { + foo := provideFoo() + bar := provideBar() + fooBar := provideFooBar(foo, bar) + return fooBar } -=== CONT TestWire/NiladicIdentity -=== CONT TestWire/ProviderSetBindingMissingConcreteType - wire_test.go:108: /tmp/wire_test2523953931/src/example.com/foo/foo.go:47:21: wire.Bind of concrete type "*example.com/foo.foo" to interface "example.com/foo.fooer", but setB does not include a provider for "*example.com/foo.foo" -=== CONT TestWire/NamingWorstCaseAllInOne -=== CONT TestWire/PartialCleanup +=== CONT TestWire/ExportedValue +=== CONT TestWire/UnusedProviders + wire_test.go:108: /tmp/wire_test1534633522/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused provider set "unusedSet" + wire_test.go:108: /tmp/wire_test1534633522/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused provider "main.provideUnused" + wire_test.go:108: /tmp/wire_test1534633522/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused value of type string + wire_test.go:108: /tmp/wire_test1534633522/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused interface binding to type example.com/foo.Fooer + wire_test.go:108: /tmp/wire_test1534633522/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused field "example.com/foo.S".Cfg +=== CONT TestWire/ExampleWithMocks +=== CONT TestWire/StructWithPreventTag + wire_test.go:108: /tmp/wire_test2753299992/src/example.com/foo/foo.go:45:2: "mu" is prevented from injecting by wire +=== CONT TestWire/InjectorMissingError +=== CONT TestWire/ValueConversion wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1034,27 +1188,16 @@ // Injectors from wire.go: - func injectBaz() (Baz, func(), error) { - foo, cleanup := provideFoo() - bar, cleanup2, err := provideBar(foo) - if err != nil { - cleanup() - return 0, nil, err - } - baz, err := provideBaz(bar) - if err != nil { - cleanup2() - cleanup() - return 0, nil, err - } - return baz, func() { - cleanup2() - cleanup() - }, nil + func injectedMessage() Foo { + foo := _wireFooValue + return foo } -=== CONT TestWire/NamingWorstCase -=== CONT TestWire/MultipleSimilarPackages -=== CONT TestWire/PkgImport + + var ( + _wireFooValue = Foo("Hello, World!") + ) +=== CONT TestWire/InterfaceValue +=== CONT TestWire/ExportedValue wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1068,21 +1211,18 @@ "example.com/bar" ) - import ( - _ "example.com/anon1" - _ "example.com/anon2" - ) - // Injectors from wire.go: - func injectFooBar() FooBar { - foo := provideFoo() - barBar := bar.ProvideBar() - fooBar := provideFooBar(foo, barBar) - return fooBar + func injectedMessage() string { + string2 := _wireStringValue + return string2 } -=== CONT TestWire/MultipleMissingInputs -=== CONT TestWire/NoInjectParamNames + + var ( + _wireStringValue = bar.PublicMsg + ) +=== CONT TestWire/InterfaceBindingReuse +=== CONT TestWire/ReturnArgumentAsInterface wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1093,20 +1233,16 @@ package main import ( - context2 "context" + "fmt" ) // Injectors from wire.go: - func inject(contextContext context2.Context, arg struct{}) (context, error) { - mainContext, err := provide(contextContext) - if err != nil { - return context{}, err - } - return mainContext, nil + func injectStringer(s MyString) fmt.Stringer { + return s } -=== CONT TestWire/MultipleBindings -=== CONT TestWire/NiladicValue +=== CONT TestWire/InterfaceBindingNotEnoughArgs +=== CONT TestWire/InterfaceValue wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1116,21 +1252,26 @@ package main + import ( + "io" + "strings" + ) + // Injectors from wire.go: - func injectedMessage() string { - string2 := _wireStringValue - return string2 + func injectedReader() io.Reader { + reader := _wireReaderValue + return reader } var ( - _wireStringValue = "Hello, World!" + _wireReaderValue = strings.NewReader("hello world") ) -=== CONT TestWire/MultipleArgsSameType -=== CONT TestWire/NoImplicitInterface - wire_test.go:108: /tmp/wire_test514850871/src/example.com/foo/wire.go:23:1: inject injectFooer: no provider found for example.com/foo.Fooer, output of injector -=== CONT TestWire/InvalidInjector -=== CONT TestWire/NiladicIdentity +=== CONT TestWire/InterfaceBindingInvalidArg0 +=== CONT TestWire/StructNotAStruct + wire_test.go:108: /tmp/wire_test2510400564/src/example.com/foo/wire.go:24:13: first argument to Struct must be a pointer to a named struct; found **example.com/foo.A +=== CONT TestWire/InterfaceBindingDoesntImplement +=== CONT TestWire/ExampleWithMocks wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1142,104 +1283,56 @@ // Injectors from wire.go: - func injectedMessage() string { - string2 := provideMessage() - return string2 + // initApp returns a real app. + func initApp() *app { + mainTimer := _wireRealTimeValue + mainGreeter := greeter{ + T: mainTimer, + } + mainApp := &app{ + g: mainGreeter, + } + return mainApp } -=== CONT TestWire/EmptyVar -=== CONT TestWire/NamingWorstCaseAllInOne - wire_test.go:164: wire_gen.go: - // Code generated by Wire. DO NOT EDIT. - - //go:generate go run github.com/google/wire/cmd/wire - //go:build !wireinject - // +build !wireinject - - package main - import ( - context2 "context" - "fmt" - "os" - "reflect" + var ( + _wireRealTimeValue = realTime{} ) - // Injectors from foo.go: - - func inject(context3 context2.Context, err2 struct{}) (context, error) { - mainContext, err := Provide(context3) - if err != nil { - return context{}, err + // initMockedAppFromArgs returns an app with mocked dependencies provided via + // arguments (Approach A). Note that the argument's type is the interface + // type (timer), but the concrete mock type should be passed. + func initMockedAppFromArgs(mt timer) *app { + mainGreeter := greeter{ + T: mt, } - return mainContext, nil + mainApp := &app{ + g: mainGreeter, + } + return mainApp } - // foo.go: - - type context struct{} - - func main() { - if _, ok := reflect.TypeOf(context{}).MethodByName("Provide"); !ok { - fmt.Println("ERROR: context.Provide renamed") - os.Exit(1) + // initMockedApp returns an app with its mocked dependencies, created + // via providers (Approach B). + func initMockedApp() *appWithMocks { + mainMockTimer := newMockTimer() + mainGreeter := greeter{ + T: mainMockTimer, } - c, err := inject(context2.Background(), struct{}{}) - if err != nil { - fmt.Println("ERROR:", err) - os.Exit(1) + mainApp := app{ + g: mainGreeter, } - fmt.Println(c) - } - - func Provide(context2_2 context2.Context) (context, error) { - var context3 = context2.Background() - _ = context2_2 - _ = context3 - return context{}, nil - } - - func (context) Provide() { + mainAppWithMocks := &appWithMocks{ + app: mainApp, + mt: mainMockTimer, + } + return mainAppWithMocks } -=== CONT TestWire/FieldsOfStructPointer -=== CONT TestWire/MultipleBindings - wire_test.go:108: /tmp/wire_test2891557781/src/example.com/foo/wire.go:27:8: multiple bindings for example.com/foo.Foo - current: - <- provider "provideFooAgain" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:39:6) - previous: - <- provider "provideFoo" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:35:6) - wire_test.go:108: /tmp/wire_test2891557781/src/example.com/foo/wire.go:32:8: multiple bindings for example.com/foo.Foo - current: - <- provider "provideFoo" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:35:6) - previous: - <- provider "provideFoo" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:35:6) - <- provider set "Set" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:31:11) - wire_test.go:108: /tmp/wire_test2891557781/src/example.com/foo/wire.go:37:8: multiple bindings for example.com/foo.Foo - current: - <- provider "provideFoo" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:35:6) - previous: - <- provider "provideFoo" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:35:6) - <- provider set "Set" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:31:11) - <- provider set "SuperSet" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:32:16) - wire_test.go:108: /tmp/wire_test2891557781/src/example.com/foo/foo.go:33:32: SetWithDuplicateBindings has multiple bindings for example.com/foo.Foo - current: - <- provider "provideFoo" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:35:6) - <- provider set "Set" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:31:11) - <- provider set "SuperSet" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:32:16) - previous: - <- provider "provideFoo" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:35:6) - <- provider set "Set" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:31:11) - wire_test.go:108: /tmp/wire_test2891557781/src/example.com/foo/wire.go:47:8: multiple bindings for example.com/foo.Foo - current: - <- wire.Value (/tmp/wire_test2891557781/src/example.com/foo/wire.go:47:42) - previous: - <- provider "provideFoo" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:35:6) - wire_test.go:108: /tmp/wire_test2891557781/src/example.com/foo/wire.go:52:8: multiple bindings for example.com/foo.Bar - current: - <- wire.Bind (/tmp/wire_test2891557781/src/example.com/foo/wire.go:52:31) - previous: - <- provider "provideBar" (/tmp/wire_test2891557781/src/example.com/foo/foo.go:43:6) -=== CONT TestWire/FieldsOfStructDoNotProvidePtrToField -=== CONT TestWire/NamingWorstCase +=== CONT TestWire/InterfaceBinding +=== CONT TestWire/InjectorMissingError + wire_test.go:108: /tmp/wire_test1437691936/src/example.com/foo/wire.go:23:1: inject injectFoo: provider for example.com/foo.Foo returns error but injection not allowed to fail +=== CONT TestWire/NiladicValue +=== CONT TestWire/ReturnError wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1249,21 +1342,17 @@ package main - import ( - context2 "context" - ) - // Injectors from wire.go: - func inject(context3 context2.Context, err2 struct{}) (context, error) { - mainContext, err := provide(context3) + func injectFoo() (Foo, error) { + foo, err := provideFoo() if err != nil { - return context{}, err + return 0, err } - return mainContext, nil + return foo, nil } -=== CONT TestWire/FieldsOfStruct -=== CONT TestWire/MultipleSimilarPackages +=== CONT TestWire/RelativePkg +=== CONT TestWire/Struct wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1273,84 +1362,27 @@ package main - import ( - "example.com/bar" - "example.com/baz" - "example.com/foo" - "fmt" - ) - // Injectors from wire.go: - func newMainService(mainConfig MainConfig) *MainService { - config := mainConfig.Foo - service := foo.New(config) - barConfig := mainConfig.Bar - barService := bar.New(barConfig, service) - bazConfig := mainConfig.baz - bazService := baz.New(bazConfig, barService) - mainService := &MainService{ - Foo: service, - Bar: barService, - baz: bazService, + func injectFooBar() FooBar { + foo := provideFoo() + bar := provideBar() + fooBar := FooBar{ + Foo: foo, + Bar: bar, } - return mainService - } - - // wire.go: - - type MainConfig struct { - Foo *foo.Config - Bar *bar.Config - baz *baz.Config - } - - type MainService struct { - Foo *foo.Service - Bar *bar.Service - baz *baz.Service - } - - func (m *MainService) String() string { - return fmt.Sprintf("%d %d %d", m.Foo.Cfg.V, m.Bar.Cfg.V, m.baz.Cfg.V) + return fooBar } - func main() { - cfg := MainConfig{ - Foo: &foo.Config{1}, - Bar: &bar.Config{2}, - baz: &baz.Config{3}, + func injectPartFooBar() FooBar { + foo := provideFoo() + fooBar := FooBar{ + Foo: foo, } - svc := newMainService(cfg) - fmt.Println(svc.String()) + return fooBar } -=== CONT TestWire/FieldsOfImportedStruct -=== CONT TestWire/MultipleMissingInputs - wire_test.go:108: /tmp/wire_test2638942896/src/example.com/foo/wire.go:23:1: inject injectMissingOutputType: no provider found for example.com/foo.Foo, output of injector - wire_test.go:108: /tmp/wire_test2638942896/src/example.com/foo/wire.go:29:1: inject injectMultipleMissingTypes: no provider found for example.com/foo.Foo - needed by example.com/foo.Baz in provider "provideBaz" (/tmp/wire_test2638942896/src/example.com/foo/foo.go:29:6) - wire_test.go:108: /tmp/wire_test2638942896/src/example.com/foo/wire.go:29:1: inject injectMultipleMissingTypes: no provider found for example.com/foo.Bar - needed by example.com/foo.Baz in provider "provideBaz" (/tmp/wire_test2638942896/src/example.com/foo/foo.go:29:6) - wire_test.go:108: /tmp/wire_test2638942896/src/example.com/foo/wire.go:35:1: inject injectMissingRecursiveType: no provider found for example.com/foo.Foo - needed by example.com/foo.Zip in provider "provideZip" (/tmp/wire_test2638942896/src/example.com/foo/foo.go:37:6) - needed by example.com/foo.Zap in provider "provideZap" (/tmp/wire_test2638942896/src/example.com/foo/foo.go:41:6) - needed by example.com/foo.Zop in provider "provideZop" (/tmp/wire_test2638942896/src/example.com/foo/foo.go:45:6) -=== CONT TestWire/FieldsOfCycle -=== CONT TestWire/MultipleArgsSameType - wire_test.go:108: /tmp/wire_test2521170561/src/example.com/foo/wire.go:25:8: multiple bindings for string - current: - <- argument b to injector function inject (/tmp/wire_test2521170561/src/example.com/foo/wire.go:23:1) - previous: - <- argument a to injector function inject (/tmp/wire_test2521170561/src/example.com/foo/wire.go:23:1) -=== CONT TestWire/ExportedValueDifferentPackage -=== CONT TestWire/InvalidInjector - wire_test.go:108: a call to wire.Build indicates that this function is an injector, but injectors must consist of only the wire.Build call and an optional return - wire_test.go:108: a call to wire.Build indicates that this function is an injector, but injectors must consist of only the wire.Build call and an optional return -=== CONT TestWire/ExportedValue -=== CONT TestWire/EmptyVar - wire_test.go:108: /tmp/wire_test1672294869/src/example.com/foo/wire.go:24:13: var example.com/foo.myFakeSet struct{} is not a provider or a provider set -=== CONT TestWire/ExampleWithMocks -=== CONT TestWire/FieldsOfStructPointer +=== CONT TestWire/ProviderSetBindingMissingConcreteType +=== CONT TestWire/InterfaceBindingReuse wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1362,29 +1394,21 @@ // Injectors from wire.go: - func injectedMessage() string { - s := provideS() - string2 := s.Foo - return string2 - } - - func injectedMessagePtr() *string { - s := provideS() - string2 := &s.Foo - return string2 + func injectFooBar() FooBar { + bar := provideBar() + fooBar := provideFooBar(bar, bar) + return fooBar } -=== CONT TestWire/Cleanup -=== CONT TestWire/FieldsOfStructDoNotProvidePtrToField - wire_test.go:108: /tmp/wire_test57385652/src/example.com/foo/wire.go:23:1: inject injectedMessagePtr: no provider found for *string, output of injector -=== CONT TestWire/DocComment -=== CONT TestWire/FieldsOfCycle - wire_test.go:108: /tmp/wire_test2773177962/src/example.com/foo/wire.go:23:1: cycle for example.com/foo.Bar: - example.com/foo.Bar (example.com/foo.provideBar) -> - example.com/foo.Foo (example.com/foo.provideFoo) -> - example.com/foo.Baz (example.com/foo.Bar.Bz) -> - example.com/foo.Bar -=== CONT TestWire/Cycle -=== CONT TestWire/FieldsOfImportedStruct +=== CONT TestWire/PkgImport +=== CONT TestWire/InterfaceBindingInvalidArg0 + wire_test.go:108: /tmp/wire_test3234191279/src/example.com/foo/wire.go:25:13: first argument to Bind must be a pointer to an interface type; found string +=== CONT TestWire/PartialCleanup +=== CONT TestWire/InterfaceBindingNotEnoughArgs + wire_test.go:108: /tmp/wire_test1963821623/src/example.com/foo/wire.go:25:33: not enough arguments in call to wire.Bind + have (*Fooer) + want (interface{}, interface{}) +=== CONT TestWire/NoopBuild +=== CONT TestWire/InterfaceBinding wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1394,39 +1418,17 @@ package main - import ( - "example.com/bar" - "example.com/baz" - "example.com/foo" - "fmt" - ) - // Injectors from wire.go: - func newBazService(config *baz.Config) *baz.Service { - fooConfig := config.Foo - service := foo.New(fooConfig) - barConfig := config.Bar - barService := bar.New(barConfig, service) - bazService := &baz.Service{ - Foo: service, - Bar: barService, - } - return bazService - } - - // wire.go: - - func main() { - cfg := &baz.Config{ - Foo: &foo.Config{1}, - Bar: &bar.Config{2}, - } - svc := newBazService(cfg) - fmt.Println(svc.String()) + func injectFooer() Fooer { + bar := provideBar() + return bar } -=== CONT TestWire/CopyOtherDecls -=== CONT TestWire/FieldsOfStruct +=== CONT TestWire/NoInjectParamNames +=== CONT TestWire/ProviderSetBindingMissingConcreteType + wire_test.go:108: /tmp/wire_test2481282973/src/example.com/foo/foo.go:47:21: wire.Bind of concrete type "*example.com/foo.foo" to interface "example.com/foo.fooer", but setB does not include a provider for "*example.com/foo.foo" +=== CONT TestWire/NoImplicitInterface +=== CONT TestWire/NiladicValue wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1439,12 +1441,15 @@ // Injectors from wire.go: func injectedMessage() string { - s := provideS() - string2 := s.Foo + string2 := _wireStringValue return string2 } -=== CONT TestWire/BuildTagsAllPackages -=== CONT TestWire/ExportedValueDifferentPackage + + var ( + _wireStringValue = "Hello, World!" + ) +=== CONT TestWire/InjectInput +=== CONT TestWire/RelativePkg wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1454,22 +1459,17 @@ package main - import ( - "os" - ) - // Injectors from wire.go: - func injectedFile() *os.File { - file := _wireFileValue - return file + func injectedMessage() string { + string2 := provideMessage() + return string2 } - - var ( - _wireFileValue = os.Stdout - ) -=== CONT TestWire/Chain -=== CONT TestWire/ExportedValue +=== CONT TestWire/InjectorMissingCleanup +=== CONT TestWire/InterfaceBindingDoesntImplement + wire_test.go:108: /tmp/wire_test2441186039/src/example.com/foo/wire.go:25:13: string does not implement example.com/foo.Fooer +=== CONT TestWire/InjectWithPanic +=== CONT TestWire/PkgImport wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1483,18 +1483,21 @@ "example.com/bar" ) + import ( + _ "example.com/anon1" + _ "example.com/anon2" + ) + // Injectors from wire.go: - func injectedMessage() string { - string2 := _wireStringValue - return string2 + func injectFooBar() FooBar { + foo := provideFoo() + barBar := bar.ProvideBar() + fooBar := provideFooBar(foo, barBar) + return fooBar } - - var ( - _wireStringValue = bar.PublicMsg - ) -=== CONT TestWire/InjectInput -=== CONT TestWire/ExampleWithMocks +=== CONT TestWire/InjectInputConflict +=== CONT TestWire/PartialCleanup wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1506,53 +1509,54 @@ // Injectors from wire.go: - // initApp returns a real app. - func initApp() *app { - mainTimer := _wireRealTimeValue - mainGreeter := greeter{ - T: mainTimer, + func injectBaz() (Baz, func(), error) { + foo, cleanup := provideFoo() + bar, cleanup2, err := provideBar(foo) + if err != nil { + cleanup() + return 0, nil, err } - mainApp := &app{ - g: mainGreeter, + baz, err := provideBaz(bar) + if err != nil { + cleanup2() + cleanup() + return 0, nil, err } - return mainApp + return baz, func() { + cleanup2() + cleanup() + }, nil } +=== CONT TestWire/NamingWorstCaseAllInOne +=== CONT TestWire/NoInjectParamNames + wire_test.go:164: wire_gen.go: + // Code generated by Wire. DO NOT EDIT. - var ( - _wireRealTimeValue = realTime{} + //go:generate go run github.com/google/wire/cmd/wire + //go:build !wireinject + // +build !wireinject + + package main + + import ( + context2 "context" ) - // initMockedAppFromArgs returns an app with mocked dependencies provided via - // arguments (Approach A). Note that the argument's type is the interface - // type (timer), but the concrete mock type should be passed. - func initMockedAppFromArgs(mt timer) *app { - mainGreeter := greeter{ - T: mt, - } - mainApp := &app{ - g: mainGreeter, - } - return mainApp - } + // Injectors from wire.go: - // initMockedApp returns an app with its mocked dependencies, created - // via providers (Approach B). - func initMockedApp() *appWithMocks { - mainMockTimer := newMockTimer() - mainGreeter := greeter{ - T: mainMockTimer, - } - mainApp := app{ - g: mainGreeter, - } - mainAppWithMocks := &appWithMocks{ - app: mainApp, - mt: mainMockTimer, + func inject(contextContext context2.Context, arg struct{}) (context, error) { + mainContext, err := provide(contextContext) + if err != nil { + return context{}, err } - return mainAppWithMocks + return mainContext, nil } -=== CONT TestWire/InjectorMissingCleanup -=== CONT TestWire/Cleanup +=== CONT TestWire/NiladicIdentity +=== CONT TestWire/BindInterfaceWithValue +=== CONT TestWire/NoImplicitInterface + wire_test.go:108: /tmp/wire_test2995428002/src/example.com/foo/wire.go:23:1: inject injectFooer: no provider found for example.com/foo.Fooer, output of injector +=== CONT TestWire/MultipleBindings +=== CONT TestWire/InjectInput wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1564,16 +1568,16 @@ // Injectors from wire.go: - func injectBar() (*Bar, func()) { - foo, cleanup := provideFoo() - bar, cleanup2 := provideBar(foo) - return bar, func() { - cleanup2() - cleanup() - } + func injectFooBar(foo Foo) FooBar { + bar := provideBar() + fooBar := provideFooBar(foo, bar) + return fooBar } +=== CONT TestWire/MultipleMissingInputs +=== CONT TestWire/InjectorMissingCleanup + wire_test.go:108: /tmp/wire_test842667243/src/example.com/foo/wire.go:23:1: inject injectFoo: provider for example.com/foo.Foo returns cleanup but injection does not return cleanup function +=== CONT TestWire/Header === CONT TestWire/InjectWithPanic -=== CONT TestWire/DocComment wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1585,19 +1589,50 @@ // Injectors from wire.go: - /* blockComment returns Foo and has a /*- style doc comment */ - func blockComment() *Foo { - foo := &Foo{} - return foo - } - - // lineComment returns Bar and has a //- style doc comment - func lineComment() *Bar { - bar := &Bar{} - return bar + func injectedMessage() string { + string2 := provideMessage() + return string2 } -=== CONT TestWire/InjectInputConflict -=== CONT TestWire/BuildTagsAllPackages +=== CONT TestWire/ImportedInterfaceBinding +=== CONT TestWire/MultipleBindings + wire_test.go:108: /tmp/wire_test1487463300/src/example.com/foo/wire.go:27:8: multiple bindings for example.com/foo.Foo + current: + <- provider "provideFooAgain" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:39:6) + previous: + <- provider "provideFoo" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:35:6) + wire_test.go:108: /tmp/wire_test1487463300/src/example.com/foo/wire.go:32:8: multiple bindings for example.com/foo.Foo + current: + <- provider "provideFoo" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:35:6) + previous: + <- provider "provideFoo" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:35:6) + <- provider set "Set" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:31:11) + wire_test.go:108: /tmp/wire_test1487463300/src/example.com/foo/wire.go:37:8: multiple bindings for example.com/foo.Foo + current: + <- provider "provideFoo" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:35:6) + previous: + <- provider "provideFoo" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:35:6) + <- provider set "Set" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:31:11) + <- provider set "SuperSet" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:32:16) + wire_test.go:108: /tmp/wire_test1487463300/src/example.com/foo/foo.go:33:32: SetWithDuplicateBindings has multiple bindings for example.com/foo.Foo + current: + <- provider "provideFoo" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:35:6) + <- provider set "Set" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:31:11) + <- provider set "SuperSet" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:32:16) + previous: + <- provider "provideFoo" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:35:6) + <- provider set "Set" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:31:11) + wire_test.go:108: /tmp/wire_test1487463300/src/example.com/foo/wire.go:47:8: multiple bindings for example.com/foo.Foo + current: + <- wire.Value (/tmp/wire_test1487463300/src/example.com/foo/wire.go:47:42) + previous: + <- provider "provideFoo" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:35:6) + wire_test.go:108: /tmp/wire_test1487463300/src/example.com/foo/wire.go:52:8: multiple bindings for example.com/foo.Bar + current: + <- wire.Bind (/tmp/wire_test1487463300/src/example.com/foo/wire.go:52:31) + previous: + <- provider "provideBar" (/tmp/wire_test1487463300/src/example.com/foo/foo.go:43:6) +=== CONT TestWire/MultipleArgsSameType +=== CONT TestWire/NiladicIdentity wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1610,22 +1645,11 @@ // Injectors from wire.go: func injectedMessage() string { - string2 := _wireStringValue + string2 := provideMessage() return string2 } - - var ( - _wireStringValue = "Hello, World!" - ) -=== CONT TestWire/Header -=== CONT TestWire/Cycle - wire_test.go:108: /tmp/wire_test3223520265/src/example.com/foo/wire.go:23:1: cycle for example.com/foo.Bar: - example.com/foo.Bar (example.com/foo.provideBar) -> - example.com/foo.Foo (example.com/foo.provideFoo) -> - example.com/foo.Baz (example.com/foo.provideBaz) -> - example.com/foo.Bar -=== CONT TestWire/ImportedInterfaceBinding -=== CONT TestWire/CopyOtherDecls +=== CONT TestWire/InvalidInjector +=== CONT TestWire/NamingWorstCaseAllInOne wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1636,46 +1660,58 @@ package main import ( + context2 "context" "fmt" + "os" + "reflect" ) // Injectors from foo.go: - func injectedMessage() string { - string2 := provideMessage() - return string2 + func inject(context3 context2.Context, err2 struct{}) (context, error) { + mainContext, err := Provide(context3) + if err != nil { + return context{}, err + } + return mainContext, nil } // foo.go: + type context struct{} + func main() { - fmt.Println(injectedMessage()) + if _, ok := reflect.TypeOf(context{}).MethodByName("Provide"); !ok { + fmt.Println("ERROR: context.Provide renamed") + os.Exit(1) + } + c, err := inject(context2.Background(), struct{}{}) + if err != nil { + fmt.Println("ERROR:", err) + os.Exit(1) + } + fmt.Println(c) } - // provideMessage provides a friendly user greeting. - func provideMessage() string { - return "Hello, World!" + func Provide(context2_2 context2.Context) (context, error) { + var context3 = context2.Background() + _ = context2_2 + _ = context3 + return context{}, nil } -=== CONT TestWire/InterfaceBindingReuse -=== CONT TestWire/InjectInput - wire_test.go:164: wire_gen.go: - // Code generated by Wire. DO NOT EDIT. - - //go:generate go run github.com/google/wire/cmd/wire - //go:build !wireinject - // +build !wireinject - package main - - // Injectors from wire.go: - - func injectFooBar(foo Foo) FooBar { - bar := provideBar() - fooBar := provideFooBar(foo, bar) - return fooBar + func (context) Provide() { } -=== CONT TestWire/InterfaceValueDoesntImplement -=== CONT TestWire/Chain +=== CONT TestWire/BindInjectorArgPointer +=== CONT TestWire/InjectInputConflict + wire_test.go:108: /tmp/wire_test207847614/src/example.com/foo/wire.go:24:2: multiple bindings for example.com/foo.Foo + current: + <- provider "provideFoo" (/tmp/wire_test207847614/src/example.com/foo/foo.go:37:6) + <- provider set "Set" (/tmp/wire_test207847614/src/example.com/foo/foo.go:33:11) + previous: + <- argument foo to injector function injectBar (/tmp/wire_test207847614/src/example.com/foo/wire.go:23:1) +=== CONT TestWire/NamingWorstCase +=== CONT TestWire/BindInterfaceWithValue wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1685,25 +1721,33 @@ package main + import ( + "io" + "os" + ) + // Injectors from wire.go: - func injectFooBar() FooBar { - foo := provideFoo() - fooBar := provideFooBar(foo) - return fooBar + func inject() io.Writer { + file := _wireFileValue + return file } -=== CONT TestWire/InterfaceValue -=== CONT TestWire/InjectorMissingCleanup - wire_test.go:108: /tmp/wire_test1124876532/src/example.com/foo/wire.go:23:1: inject injectFoo: provider for example.com/foo.Foo returns cleanup but injection does not return cleanup function + + var ( + _wireFileValue = os.Stdout + ) +=== CONT TestWire/MultipleSimilarPackages +=== CONT TestWire/MultipleMissingInputs + wire_test.go:108: /tmp/wire_test2267841443/src/example.com/foo/wire.go:23:1: inject injectMissingOutputType: no provider found for example.com/foo.Foo, output of injector + wire_test.go:108: /tmp/wire_test2267841443/src/example.com/foo/wire.go:29:1: inject injectMultipleMissingTypes: no provider found for example.com/foo.Foo + needed by example.com/foo.Baz in provider "provideBaz" (/tmp/wire_test2267841443/src/example.com/foo/foo.go:29:6) + wire_test.go:108: /tmp/wire_test2267841443/src/example.com/foo/wire.go:29:1: inject injectMultipleMissingTypes: no provider found for example.com/foo.Bar + needed by example.com/foo.Baz in provider "provideBaz" (/tmp/wire_test2267841443/src/example.com/foo/foo.go:29:6) + wire_test.go:108: /tmp/wire_test2267841443/src/example.com/foo/wire.go:35:1: inject injectMissingRecursiveType: no provider found for example.com/foo.Foo + needed by example.com/foo.Zip in provider "provideZip" (/tmp/wire_test2267841443/src/example.com/foo/foo.go:37:6) + needed by example.com/foo.Zap in provider "provideZap" (/tmp/wire_test2267841443/src/example.com/foo/foo.go:41:6) + needed by example.com/foo.Zop in provider "provideZop" (/tmp/wire_test2267841443/src/example.com/foo/foo.go:45:6) === CONT TestWire/FuncArgProvider -=== CONT TestWire/InjectInputConflict - wire_test.go:108: /tmp/wire_test2723716000/src/example.com/foo/wire.go:24:2: multiple bindings for example.com/foo.Foo - current: - <- provider "provideFoo" (/tmp/wire_test2723716000/src/example.com/foo/foo.go:37:6) - <- provider set "Set" (/tmp/wire_test2723716000/src/example.com/foo/foo.go:33:11) - previous: - <- argument foo to injector function injectBar (/tmp/wire_test2723716000/src/example.com/foo/wire.go:23:1) -=== CONT TestWire/BindInterfaceWithValue === CONT TestWire/Header wire_test.go:164: wire_gen.go: // This is a sample header file. @@ -1722,24 +1766,6 @@ foo := provideFoo() return foo } -=== CONT TestWire/BindInjectorArgPointer -=== CONT TestWire/InjectWithPanic - wire_test.go:164: wire_gen.go: - // Code generated by Wire. DO NOT EDIT. - - //go:generate go run github.com/google/wire/cmd/wire - //go:build !wireinject - // +build !wireinject - - package main - - // Injectors from wire.go: - - func injectedMessage() string { - string2 := provideMessage() - return string2 - } -=== CONT TestWire/InterfaceBindingInvalidArg0 === CONT TestWire/ImportedInterfaceBinding wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1760,8 +1786,16 @@ bar := provideBar() return bar } -=== CONT TestWire/InterfaceBindingNotEnoughArgs -=== CONT TestWire/InterfaceBindingReuse +=== CONT TestWire/InvalidInjector + wire_test.go:108: a call to wire.Build indicates that this function is an injector, but injectors must consist of only the wire.Build call and an optional return + wire_test.go:108: a call to wire.Build indicates that this function is an injector, but injectors must consist of only the wire.Build call and an optional return +=== CONT TestWire/MultipleArgsSameType + wire_test.go:108: /tmp/wire_test3883268572/src/example.com/foo/wire.go:25:8: multiple bindings for string + current: + <- argument b to injector function inject (/tmp/wire_test3883268572/src/example.com/foo/wire.go:23:1) + previous: + <- argument a to injector function inject (/tmp/wire_test3883268572/src/example.com/foo/wire.go:23:1) +=== CONT TestWire/NamingWorstCase wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1771,17 +1805,20 @@ package main + import ( + context2 "context" + ) + // Injectors from wire.go: - func injectFooBar() FooBar { - bar := provideBar() - fooBar := provideFooBar(bar, bar) - return fooBar + func inject(context3 context2.Context, err2 struct{}) (context, error) { + mainContext, err := provide(context3) + if err != nil { + return context{}, err + } + return mainContext, nil } -=== CONT TestWire/InterfaceBindingDoesntImplement -=== CONT TestWire/InterfaceValueDoesntImplement - wire_test.go:108: /tmp/wire_test840733204/src/example.com/foo/wire.go:26:13: string does not implement io.Reader -=== CONT TestWire/InterfaceValue +=== CONT TestWire/BindInjectorArgPointer wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1791,24 +1828,13 @@ package main - import ( - "io" - "strings" - ) - // Injectors from wire.go: - func injectedReader() io.Reader { - reader := _wireReaderValue - return reader + func inject(foo *Foo) *Bar { + bar := NewBar(foo) + return bar } - - var ( - _wireReaderValue = strings.NewReader("hello world") - ) -=== CONT TestWire/FuncArgProvider - wire_test.go:108: /tmp/wire_test2914729033/src/example.com/foo/wire.go:25:19: var fn func() *example.com/foo.Foo is not a provider or a provider set -=== CONT TestWire/BindInterfaceWithValue +=== CONT TestWire/MultipleSimilarPackages wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1819,115 +1845,129 @@ package main import ( - "io" - "os" + "example.com/bar" + "example.com/baz" + "example.com/foo" + "fmt" ) // Injectors from wire.go: - func inject() io.Writer { - file := _wireFileValue - return file + func newMainService(mainConfig MainConfig) *MainService { + config := mainConfig.Foo + service := foo.New(config) + barConfig := mainConfig.Bar + barService := bar.New(barConfig, service) + bazConfig := mainConfig.baz + bazService := baz.New(bazConfig, barService) + mainService := &MainService{ + Foo: service, + Bar: barService, + baz: bazService, + } + return mainService } - var ( - _wireFileValue = os.Stdout - ) -=== CONT TestWire/BindInjectorArgPointer - wire_test.go:164: wire_gen.go: - // Code generated by Wire. DO NOT EDIT. + // wire.go: - //go:generate go run github.com/google/wire/cmd/wire - //go:build !wireinject - // +build !wireinject + type MainConfig struct { + Foo *foo.Config + Bar *bar.Config + baz *baz.Config + } - package main + type MainService struct { + Foo *foo.Service + Bar *bar.Service + baz *baz.Service + } - // Injectors from wire.go: + func (m *MainService) String() string { + return fmt.Sprintf("%d %d %d", m.Foo.Cfg.V, m.Bar.Cfg.V, m.baz.Cfg.V) + } - func inject(foo *Foo) *Bar { - bar := NewBar(foo) - return bar + func main() { + cfg := MainConfig{ + Foo: &foo.Config{1}, + Bar: &bar.Config{2}, + baz: &baz.Config{3}, + } + svc := newMainService(cfg) + fmt.Println(svc.String()) } -=== CONT TestWire/InterfaceBindingInvalidArg0 - wire_test.go:108: /tmp/wire_test172934401/src/example.com/foo/wire.go:25:13: first argument to Bind must be a pointer to an interface type; found string -=== CONT TestWire/InterfaceBindingNotEnoughArgs - wire_test.go:108: /tmp/wire_test3016630183/src/example.com/foo/wire.go:25:33: not enough arguments in call to wire.Bind - have (*Fooer) - want (interface{}, interface{}) -=== CONT TestWire/InterfaceBindingDoesntImplement - wire_test.go:108: /tmp/wire_test554800180/src/example.com/foo/wire.go:25:13: string does not implement example.com/foo.Fooer ---- PASS: TestWire (0.06s) - --- PASS: TestWire/InterfaceValueInvalidArg0 (13.53s) - --- PASS: TestWire/FieldsOfValueStruct (14.28s) - --- PASS: TestWire/VarValue (14.40s) - --- PASS: TestWire/InjectorMissingError (14.51s) - --- PASS: TestWire/InterfaceBinding (14.61s) - --- PASS: TestWire/BindInjectorArg (15.12s) - --- PASS: TestWire/Varargs (16.32s) - --- PASS: TestWire/InterfaceValueNotEnoughArgs (16.78s) - --- PASS: TestWire/ValueIsStruct (11.56s) - --- PASS: TestWire/ValueIsInterfaceValue (12.11s) - --- PASS: TestWire/ValueFromFunctionScope (12.10s) - --- PASS: TestWire/UnexportedValue (10.56s) - --- PASS: TestWire/ValueConversion (12.42s) - --- PASS: TestWire/ValueChain (12.41s) - --- PASS: TestWire/UnusedProviders (11.93s) - --- PASS: TestWire/UnexportedStruct (10.33s) - --- PASS: TestWire/TwoDeps (11.97s) - --- PASS: TestWire/StructWithPreventTag (13.26s) - --- PASS: TestWire/ReturnError (13.29s) - --- PASS: TestWire/ReturnArgumentAsInterface (13.74s) - --- PASS: TestWire/Struct (13.87s) - --- PASS: TestWire/StructPointer (15.49s) - --- PASS: TestWire/StructNotAStruct (16.07s) - --- PASS: TestWire/ReservedKeywords (15.93s) - --- PASS: TestWire/RelativePkg (12.64s) - --- PASS: TestWire/ProviderSetBindingMissingConcreteType (10.84s) - --- PASS: TestWire/PartialCleanup (10.48s) - --- PASS: TestWire/NoopBuild (10.78s) - --- PASS: TestWire/PkgImport (11.73s) - --- PASS: TestWire/NoInjectParamNames (10.69s) - --- PASS: TestWire/NiladicValue (10.23s) - --- PASS: TestWire/NoImplicitInterface (10.57s) - --- PASS: TestWire/NiladicIdentity (7.72s) - --- PASS: TestWire/NamingWorstCaseAllInOne (7.91s) - --- PASS: TestWire/MultipleBindings (7.45s) - --- PASS: TestWire/NamingWorstCase (9.68s) - --- PASS: TestWire/MultipleSimilarPackages (9.44s) - --- PASS: TestWire/MultipleMissingInputs (9.75s) - --- PASS: TestWire/MultipleArgsSameType (10.63s) - --- PASS: TestWire/InvalidInjector (10.38s) - --- PASS: TestWire/EmptyVar (10.48s) - --- PASS: TestWire/FieldsOfStructPointer (13.33s) - --- PASS: TestWire/FieldsOfStructDoNotProvidePtrToField (12.28s) - --- PASS: TestWire/FieldsOfCycle (10.74s) - --- PASS: TestWire/FieldsOfImportedStruct (12.02s) - --- PASS: TestWire/FieldsOfStruct (12.63s) - --- PASS: TestWire/ExportedValueDifferentPackage (12.33s) - --- PASS: TestWire/ExportedValue (12.55s) - --- PASS: TestWire/ExampleWithMocks (12.78s) - --- PASS: TestWire/Cleanup (12.34s) - --- PASS: TestWire/DocComment (11.91s) - --- PASS: TestWire/BuildTagsAllPackages (12.20s) - --- PASS: TestWire/Cycle (14.11s) - --- PASS: TestWire/CopyOtherDecls (14.21s) - --- PASS: TestWire/InjectInput (12.98s) - --- PASS: TestWire/Chain (14.00s) - --- PASS: TestWire/InjectorMissingCleanup (14.39s) - --- PASS: TestWire/InjectInputConflict (11.68s) - --- PASS: TestWire/Header (10.42s) - --- PASS: TestWire/InjectWithPanic (14.50s) - --- PASS: TestWire/ImportedInterfaceBinding (12.81s) - --- PASS: TestWire/InterfaceBindingReuse (12.67s) - --- PASS: TestWire/InterfaceValueDoesntImplement (11.88s) - --- PASS: TestWire/InterfaceValue (14.23s) - --- PASS: TestWire/FuncArgProvider (9.82s) - --- PASS: TestWire/BindInterfaceWithValue (9.20s) - --- PASS: TestWire/BindInjectorArgPointer (9.13s) - --- PASS: TestWire/InterfaceBindingInvalidArg0 (8.20s) - --- PASS: TestWire/InterfaceBindingNotEnoughArgs (7.90s) - --- PASS: TestWire/InterfaceBindingDoesntImplement (7.42s) +=== CONT TestWire/FuncArgProvider + wire_test.go:108: /tmp/wire_test2410364663/src/example.com/foo/wire.go:25:19: var fn func() *example.com/foo.Foo is not a provider or a provider set +--- PASS: TestWire (0.03s) + --- PASS: TestWire/EmptyVar (10.15s) + --- PASS: TestWire/BindInjectorArg (10.54s) + --- PASS: TestWire/InterfaceValueDoesntImplement (10.70s) + --- PASS: TestWire/InterfaceValueInvalidArg0 (10.71s) + --- PASS: TestWire/Varargs (10.79s) + --- PASS: TestWire/FieldsOfValueStruct (10.83s) + --- PASS: TestWire/VarValue (10.85s) + --- PASS: TestWire/InterfaceValueNotEnoughArgs (11.39s) + --- PASS: TestWire/FieldsOfImportedStruct (9.91s) + --- PASS: TestWire/FieldsOfStruct (9.47s) + --- PASS: TestWire/BuildTagsAllPackages (9.36s) + --- PASS: TestWire/ExportedValueDifferentPackage (9.52s) + --- PASS: TestWire/FieldsOfCycle (9.55s) + --- PASS: TestWire/FieldsOfStructDoNotProvidePtrToField (9.80s) + --- PASS: TestWire/FieldsOfStructPointer (10.07s) + --- PASS: TestWire/DocComment (9.26s) + --- PASS: TestWire/Cycle (10.06s) + --- PASS: TestWire/CopyOtherDecls (10.04s) + --- PASS: TestWire/ValueFromFunctionScope (9.60s) + --- PASS: TestWire/ReservedKeywords (10.10s) + --- PASS: TestWire/Chain (10.26s) + --- PASS: TestWire/ValueIsStruct (10.25s) + --- PASS: TestWire/ValueIsInterfaceValue (10.34s) + --- PASS: TestWire/Cleanup (11.16s) + --- PASS: TestWire/UnexportedValue (12.18s) + --- PASS: TestWire/StructPointer (11.48s) + --- PASS: TestWire/UnexportedStruct (12.29s) + --- PASS: TestWire/ValueChain (13.03s) + --- PASS: TestWire/TwoDeps (12.80s) + --- PASS: TestWire/UnusedProviders (13.50s) + --- PASS: TestWire/StructWithPreventTag (13.21s) + --- PASS: TestWire/ValueConversion (14.13s) + --- PASS: TestWire/ExportedValue (10.53s) + --- PASS: TestWire/ReturnArgumentAsInterface (12.43s) + --- PASS: TestWire/InterfaceValue (11.75s) + --- PASS: TestWire/StructNotAStruct (13.36s) + --- PASS: TestWire/ExampleWithMocks (12.37s) + --- PASS: TestWire/InjectorMissingError (11.98s) + --- PASS: TestWire/ReturnError (13.42s) + --- PASS: TestWire/Struct (14.10s) + --- PASS: TestWire/InterfaceBindingReuse (12.13s) + --- PASS: TestWire/InterfaceBindingInvalidArg0 (10.35s) + --- PASS: TestWire/InterfaceBindingNotEnoughArgs (11.89s) + --- PASS: TestWire/InterfaceBinding (11.97s) + --- PASS: TestWire/ProviderSetBindingMissingConcreteType (12.91s) + --- PASS: TestWire/NiladicValue (14.33s) + --- PASS: TestWire/RelativePkg (14.21s) + --- PASS: TestWire/InterfaceBindingDoesntImplement (14.76s) + --- PASS: TestWire/PkgImport (12.07s) + --- PASS: TestWire/PartialCleanup (12.45s) + --- PASS: TestWire/NoInjectParamNames (11.90s) + --- PASS: TestWire/NoopBuild (13.52s) + --- PASS: TestWire/NoImplicitInterface (11.57s) + --- PASS: TestWire/InjectInput (11.72s) + --- PASS: TestWire/InjectorMissingCleanup (12.90s) + --- PASS: TestWire/InjectWithPanic (13.72s) + --- PASS: TestWire/MultipleBindings (6.77s) + --- PASS: TestWire/NiladicIdentity (8.99s) + --- PASS: TestWire/NamingWorstCaseAllInOne (10.25s) + --- PASS: TestWire/InjectInputConflict (11.18s) + --- PASS: TestWire/BindInterfaceWithValue (8.52s) + --- PASS: TestWire/MultipleMissingInputs (11.27s) + --- PASS: TestWire/Header (10.61s) + --- PASS: TestWire/ImportedInterfaceBinding (9.95s) + --- PASS: TestWire/InvalidInjector (8.23s) + --- PASS: TestWire/MultipleArgsSameType (9.47s) + --- PASS: TestWire/NamingWorstCase (8.39s) + --- PASS: TestWire/BindInjectorArgPointer (8.83s) + --- PASS: TestWire/MultipleSimilarPackages (8.52s) + --- PASS: TestWire/FuncArgProvider (5.53s) === RUN TestUnexport --- PASS: TestUnexport (0.00s) === RUN TestExport @@ -1983,7 +2023,7 @@ --- PASS: TestDisambiguate/disambiguate("select",_map[]) (0.00s) --- PASS: TestDisambiguate/disambiguate("var",_map[]) (0.00s) PASS -ok github.com/google/wire/internal/wire 107.679s +ok github.com/google/wire/internal/wire 99.249s create-stamp debian/debhelper-build-stamp dh_testroot -O--builddirectory=_build -O--buildsystem=golang dh_prep -O--builddirectory=_build -O--buildsystem=golang @@ -2020,12 +2060,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/15451/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/15451/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/31868 and its subdirectories -I: Current time: Thu Apr 20 17:29:16 -12 2023 -I: pbuilder-time-stamp: 1682054956 +I: removing directory /srv/workspace/pbuilder/15451 and its subdirectories +I: Current time: Fri May 24 01:55:41 +14 2024 +I: pbuilder-time-stamp: 1716465341