Diff of the two buildlogs: -- --- b1/build.log 2023-04-19 11:35:14.094512837 +0000 +++ b2/build.log 2023-04-19 11:42:09.412092253 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Tue May 21 05:56:37 -12 2024 -I: pbuilder-time-stamp: 1716314197 +I: Current time: Thu Apr 20 01:35:17 +14 2023 +I: pbuilder-time-stamp: 1681904117 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,135 +29,167 @@ 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/1539067/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/2764922/tmp/hooks/D01_modify_environment starting +debug: Running on ionos1-amd64. +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 Apr 20 01:36 /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/2764922/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/2764922/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='amd64' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=16' - DISTRIBUTION='bookworm' - HOME='/root' - HOST_ARCH='amd64' + 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]="x86_64-pc-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=amd64 + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=15' + DIRSTACK=() + DISTRIBUTION=bookworm + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=x86_64 + HOST_ARCH=amd64 IFS=' ' - INVOCATION_ID='218f59d65bc1434b93f3a7ce29872fe7' - 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='1539067' - PS1='# ' - PS2='> ' + INVOCATION_ID=cf3f82f557dc4f158cb3cb1d7852eb6d + LANG=C + LANGUAGE=et_EE:et + LC_ALL=C + MACHTYPE=x86_64-pc-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=2764922 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.Eu9DC91y/pbuilderrc_83Fv --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.Eu9DC91y/b1 --logfile b1/build.log golang-github-google-wire_0.5.0-2.dsc' - SUDO_GID='111' - SUDO_UID='106' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://85.184.249.68: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.Eu9DC91y/pbuilderrc_BhWn --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.Eu9DC91y/b2 --logfile b2/build.log --extrapackages usrmerge golang-github-google-wire_0.5.0-2.dsc' + SUDO_GID=110 + SUDO_UID=105 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://78.137.99.97:3128 I: uname -a - Linux ionos15-amd64 6.1.0-0.deb11.5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.12-1~bpo11+1 (2023-03-05) x86_64 GNU/Linux + Linux i-capture-the-hostname 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux I: ls -l /bin total 5632 - -rwxr-xr-x 1 root root 1265648 Feb 12 2023 bash - -rwxr-xr-x 3 root root 39224 Sep 18 2022 bunzip2 - -rwxr-xr-x 3 root root 39224 Sep 18 2022 bzcat - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzcmp -> bzdiff - -rwxr-xr-x 1 root root 2225 Sep 18 2022 bzdiff - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzegrep -> bzgrep - -rwxr-xr-x 1 root root 4893 Nov 27 2021 bzexe - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzfgrep -> bzgrep - -rwxr-xr-x 1 root root 3775 Sep 18 2022 bzgrep - -rwxr-xr-x 3 root root 39224 Sep 18 2022 bzip2 - -rwxr-xr-x 1 root root 14568 Sep 18 2022 bzip2recover - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzless -> bzmore - -rwxr-xr-x 1 root root 1297 Sep 18 2022 bzmore - -rwxr-xr-x 1 root root 44016 Sep 20 2022 cat - -rwxr-xr-x 1 root root 68656 Sep 20 2022 chgrp - -rwxr-xr-x 1 root root 64496 Sep 20 2022 chmod - -rwxr-xr-x 1 root root 72752 Sep 20 2022 chown - -rwxr-xr-x 1 root root 151152 Sep 20 2022 cp - -rwxr-xr-x 1 root root 125640 Jan 5 2023 dash - -rwxr-xr-x 1 root root 121904 Sep 20 2022 date - -rwxr-xr-x 1 root root 89240 Sep 20 2022 dd - -rwxr-xr-x 1 root root 102200 Sep 20 2022 df - -rwxr-xr-x 1 root root 151344 Sep 20 2022 dir - -rwxr-xr-x 1 root root 88656 Mar 22 2023 dmesg - lrwxrwxrwx 1 root root 8 Dec 19 2022 dnsdomainname -> hostname - lrwxrwxrwx 1 root root 8 Dec 19 2022 domainname -> hostname - -rwxr-xr-x 1 root root 43856 Sep 20 2022 echo - -rwxr-xr-x 1 root root 41 Jan 24 2023 egrep - -rwxr-xr-x 1 root root 35664 Sep 20 2022 false - -rwxr-xr-x 1 root root 41 Jan 24 2023 fgrep - -rwxr-xr-x 1 root root 85600 Mar 22 2023 findmnt - -rwsr-xr-x 1 root root 35128 Mar 22 2023 fusermount - -rwxr-xr-x 1 root root 203152 Jan 24 2023 grep - -rwxr-xr-x 2 root root 2346 Apr 9 2022 gunzip - -rwxr-xr-x 1 root root 6447 Apr 9 2022 gzexe - -rwxr-xr-x 1 root root 98136 Apr 9 2022 gzip - -rwxr-xr-x 1 root root 22680 Dec 19 2022 hostname - -rwxr-xr-x 1 root root 72824 Sep 20 2022 ln - -rwxr-xr-x 1 root root 53024 Mar 23 2023 login - -rwxr-xr-x 1 root root 151344 Sep 20 2022 ls - -rwxr-xr-x 1 root root 207168 Mar 22 2023 lsblk - -rwxr-xr-x 1 root root 97552 Sep 20 2022 mkdir - -rwxr-xr-x 1 root root 72912 Sep 20 2022 mknod - -rwxr-xr-x 1 root root 43952 Sep 20 2022 mktemp - -rwxr-xr-x 1 root root 59712 Mar 22 2023 more - -rwsr-xr-x 1 root root 59704 Mar 22 2023 mount - -rwxr-xr-x 1 root root 18744 Mar 22 2023 mountpoint - -rwxr-xr-x 1 root root 142968 Sep 20 2022 mv - lrwxrwxrwx 1 root root 8 Dec 19 2022 nisdomainname -> hostname - lrwxrwxrwx 1 root root 14 Apr 2 2023 pidof -> /sbin/killall5 - -rwxr-xr-x 1 root root 43952 Sep 20 2022 pwd - lrwxrwxrwx 1 root root 4 Feb 12 2023 rbash -> bash - -rwxr-xr-x 1 root root 52112 Sep 20 2022 readlink - -rwxr-xr-x 1 root root 72752 Sep 20 2022 rm - -rwxr-xr-x 1 root root 56240 Sep 20 2022 rmdir - -rwxr-xr-x 1 root root 27560 Nov 2 2022 run-parts - -rwxr-xr-x 1 root root 126424 Jan 5 2023 sed - lrwxrwxrwx 1 root root 4 Jan 5 2023 sh -> dash - -rwxr-xr-x 1 root root 43888 Sep 20 2022 sleep - -rwxr-xr-x 1 root root 85008 Sep 20 2022 stty - -rwsr-xr-x 1 root root 72000 Mar 22 2023 su - -rwxr-xr-x 1 root root 39824 Sep 20 2022 sync - -rwxr-xr-x 1 root root 531984 Apr 6 2023 tar - -rwxr-xr-x 1 root root 14520 Nov 2 2022 tempfile - -rwxr-xr-x 1 root root 109616 Sep 20 2022 touch - -rwxr-xr-x 1 root root 35664 Sep 20 2022 true - -rwxr-xr-x 1 root root 14568 Mar 22 2023 ulockmgr_server - -rwsr-xr-x 1 root root 35128 Mar 22 2023 umount - -rwxr-xr-x 1 root root 43888 Sep 20 2022 uname - -rwxr-xr-x 2 root root 2346 Apr 9 2022 uncompress - -rwxr-xr-x 1 root root 151344 Sep 20 2022 vdir - -rwxr-xr-x 1 root root 72024 Mar 22 2023 wdctl - lrwxrwxrwx 1 root root 8 Dec 19 2022 ypdomainname -> hostname - -rwxr-xr-x 1 root root 1984 Apr 9 2022 zcat - -rwxr-xr-x 1 root root 1678 Apr 9 2022 zcmp - -rwxr-xr-x 1 root root 6460 Apr 9 2022 zdiff - -rwxr-xr-x 1 root root 29 Apr 9 2022 zegrep - -rwxr-xr-x 1 root root 29 Apr 9 2022 zfgrep - -rwxr-xr-x 1 root root 2081 Apr 9 2022 zforce - -rwxr-xr-x 1 root root 8103 Apr 9 2022 zgrep - -rwxr-xr-x 1 root root 2206 Apr 9 2022 zless - -rwxr-xr-x 1 root root 1842 Apr 9 2022 zmore - -rwxr-xr-x 1 root root 4577 Apr 9 2022 znew -I: user script /srv/workspace/pbuilder/1539067/tmp/hooks/D02_print_environment finished + -rwxr-xr-x 1 root root 1265648 Feb 13 10:05 bash + -rwxr-xr-x 3 root root 39224 Sep 19 2022 bunzip2 + -rwxr-xr-x 3 root root 39224 Sep 19 2022 bzcat + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzcmp -> bzdiff + -rwxr-xr-x 1 root root 2225 Sep 19 2022 bzdiff + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzegrep -> bzgrep + -rwxr-xr-x 1 root root 4893 Nov 28 2021 bzexe + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzfgrep -> bzgrep + -rwxr-xr-x 1 root root 3775 Sep 19 2022 bzgrep + -rwxr-xr-x 3 root root 39224 Sep 19 2022 bzip2 + -rwxr-xr-x 1 root root 14568 Sep 19 2022 bzip2recover + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzless -> bzmore + -rwxr-xr-x 1 root root 1297 Sep 19 2022 bzmore + -rwxr-xr-x 1 root root 44016 Sep 21 2022 cat + -rwxr-xr-x 1 root root 68656 Sep 21 2022 chgrp + -rwxr-xr-x 1 root root 64496 Sep 21 2022 chmod + -rwxr-xr-x 1 root root 72752 Sep 21 2022 chown + -rwxr-xr-x 1 root root 151152 Sep 21 2022 cp + -rwxr-xr-x 1 root root 125640 Jan 6 03:20 dash + -rwxr-xr-x 1 root root 121904 Sep 21 2022 date + -rwxr-xr-x 1 root root 89240 Sep 21 2022 dd + -rwxr-xr-x 1 root root 102200 Sep 21 2022 df + -rwxr-xr-x 1 root root 151344 Sep 21 2022 dir + -rwxr-xr-x 1 root root 88656 Mar 24 00:02 dmesg + lrwxrwxrwx 1 root root 8 Dec 20 03:33 dnsdomainname -> hostname + lrwxrwxrwx 1 root root 8 Dec 20 03:33 domainname -> hostname + -rwxr-xr-x 1 root root 43856 Sep 21 2022 echo + -rwxr-xr-x 1 root root 41 Jan 25 04:43 egrep + -rwxr-xr-x 1 root root 35664 Sep 21 2022 false + -rwxr-xr-x 1 root root 41 Jan 25 04:43 fgrep + -rwxr-xr-x 1 root root 85600 Mar 24 00:02 findmnt + -rwsr-xr-x 1 root root 35128 Mar 23 22:35 fusermount + -rwxr-xr-x 1 root root 203152 Jan 25 04:43 grep + -rwxr-xr-x 2 root root 2346 Apr 10 2022 gunzip + -rwxr-xr-x 1 root root 6447 Apr 10 2022 gzexe + -rwxr-xr-x 1 root root 98136 Apr 10 2022 gzip + -rwxr-xr-x 1 root root 22680 Dec 20 03:33 hostname + -rwxr-xr-x 1 root root 72824 Sep 21 2022 ln + -rwxr-xr-x 1 root root 53024 Mar 24 02:40 login + -rwxr-xr-x 1 root root 151344 Sep 21 2022 ls + -rwxr-xr-x 1 root root 207168 Mar 24 00:02 lsblk + -rwxr-xr-x 1 root root 97552 Sep 21 2022 mkdir + -rwxr-xr-x 1 root root 72912 Sep 21 2022 mknod + -rwxr-xr-x 1 root root 43952 Sep 21 2022 mktemp + -rwxr-xr-x 1 root root 59712 Mar 24 00:02 more + -rwsr-xr-x 1 root root 59704 Mar 24 00:02 mount + -rwxr-xr-x 1 root root 18744 Mar 24 00:02 mountpoint + -rwxr-xr-x 1 root root 142968 Sep 21 2022 mv + lrwxrwxrwx 1 root root 8 Dec 20 03:33 nisdomainname -> hostname + lrwxrwxrwx 1 root root 14 Apr 3 20:25 pidof -> /sbin/killall5 + -rwxr-xr-x 1 root root 43952 Sep 21 2022 pwd + lrwxrwxrwx 1 root root 4 Feb 13 10:05 rbash -> bash + -rwxr-xr-x 1 root root 52112 Sep 21 2022 readlink + -rwxr-xr-x 1 root root 72752 Sep 21 2022 rm + -rwxr-xr-x 1 root root 56240 Sep 21 2022 rmdir + -rwxr-xr-x 1 root root 27560 Nov 3 06:31 run-parts + -rwxr-xr-x 1 root root 126424 Jan 6 09:55 sed + lrwxrwxrwx 1 root root 9 Apr 20 01:36 sh -> /bin/bash + -rwxr-xr-x 1 root root 43888 Sep 21 2022 sleep + -rwxr-xr-x 1 root root 85008 Sep 21 2022 stty + -rwsr-xr-x 1 root root 72000 Mar 24 00:02 su + -rwxr-xr-x 1 root root 39824 Sep 21 2022 sync + -rwxr-xr-x 1 root root 531984 Apr 7 04:25 tar + -rwxr-xr-x 1 root root 14520 Nov 3 06:31 tempfile + -rwxr-xr-x 1 root root 109616 Sep 21 2022 touch + -rwxr-xr-x 1 root root 35664 Sep 21 2022 true + -rwxr-xr-x 1 root root 14568 Mar 23 22:35 ulockmgr_server + -rwsr-xr-x 1 root root 35128 Mar 24 00:02 umount + -rwxr-xr-x 1 root root 43888 Sep 21 2022 uname + -rwxr-xr-x 2 root root 2346 Apr 10 2022 uncompress + -rwxr-xr-x 1 root root 151344 Sep 21 2022 vdir + -rwxr-xr-x 1 root root 72024 Mar 24 00:02 wdctl + lrwxrwxrwx 1 root root 8 Dec 20 03:33 ypdomainname -> hostname + -rwxr-xr-x 1 root root 1984 Apr 10 2022 zcat + -rwxr-xr-x 1 root root 1678 Apr 10 2022 zcmp + -rwxr-xr-x 1 root root 6460 Apr 10 2022 zdiff + -rwxr-xr-x 1 root root 29 Apr 10 2022 zegrep + -rwxr-xr-x 1 root root 29 Apr 10 2022 zfgrep + -rwxr-xr-x 1 root root 2081 Apr 10 2022 zforce + -rwxr-xr-x 1 root root 8103 Apr 10 2022 zgrep + -rwxr-xr-x 1 root root 2206 Apr 10 2022 zless + -rwxr-xr-x 1 root root 1842 Apr 10 2022 zmore + -rwxr-xr-x 1 root root 4577 Apr 10 2022 znew +I: user script /srv/workspace/pbuilder/2764922/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -253,7 +285,7 @@ Get: 44 http://deb.debian.org/debian bookworm/main amd64 golang-golang-x-text-dev all 0.7.0-1 [3863 kB] Get: 45 http://deb.debian.org/debian bookworm/main amd64 golang-golang-x-net-dev all 1:0.7.0+dfsg-1 [731 kB] Get: 46 http://deb.debian.org/debian bookworm/main amd64 golang-golang-x-tools-dev all 1:0.5.0+ds-1 [1469 kB] -Fetched 107 MB in 2s (53.1 MB/s) +Fetched 107 MB in 6s (17.8 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 ... 19596 files and directories currently installed.) @@ -451,8 +483,19 @@ 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/2764922/tmp/hooks/A99_set_merged_usr starting +Re-configuring usrmerge... +removed '/etc/unsupported-skip-usrmerge-conversion' +The system has been successfully converted. +I: user script /srv/workspace/pbuilder/2764922/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +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 @@ -470,27 +513,27 @@ dh_autoreconf -O--builddirectory=_build -O--buildsystem=golang 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 16 github.com/google/wire github.com/google/wire/cmd/wire github.com/google/wire/internal/wire + cd _build && go install -trimpath -v -p 15 github.com/google/wire github.com/google/wire/cmd/wire github.com/google/wire/internal/wire github.com/google/wire internal/goarch -internal/unsafeheader -internal/goexperiment -internal/goos +unicode unicode/utf8 +internal/goos +internal/goexperiment +unicode/utf16 internal/race internal/itoa -math/bits encoding -unicode -runtime/internal/math -unicode/utf16 -internal/goversion +internal/unsafeheader +math/bits internal/cpu -runtime/internal/sys runtime/internal/atomic +internal/abi runtime/internal/syscall sync/atomic -internal/abi +runtime/internal/math +internal/goversion +runtime/internal/sys internal/bytealg math runtime @@ -501,25 +544,25 @@ errors sort internal/oserror -internal/safefilepath io +internal/safefilepath strconv path syscall container/heap golang.org/x/mod/semver -strings -text/tabwriter bytes hash +text/tabwriter +strings crypto reflect go/build/constraint -regexp/syntax bufio +regexp/syntax +internal/syscall/unix internal/syscall/execenv time -internal/syscall/unix regexp context io/fs @@ -529,23 +572,23 @@ os encoding/base64 crypto/md5 -internal/lazyregexp -internal/godebug fmt -io/ioutil +internal/godebug path/filepath +internal/lazyregexp +io/ioutil os/exec internal/goroot flag go/token -golang.org/x/tools/internal/event/label -internal/buildcfg -golang.org/x/sys/execabs +go/doc/comment encoding/json -github.com/pmezard/go-difflib/difflib +golang.org/x/sys/execabs log -go/doc/comment +internal/buildcfg math/big +golang.org/x/tools/internal/event/label +github.com/pmezard/go-difflib/difflib golang.org/x/tools/internal/event/keys go/scanner github.com/google/subcommands @@ -566,15 +609,15 @@ golang.org/x/tools/internal/typeparams golang.org/x/tools/go/internal/packagesdriver golang.org/x/tools/internal/typesinternal -golang.org/x/tools/internal/gcimporter golang.org/x/tools/go/ast/astutil +golang.org/x/tools/internal/gcimporter golang.org/x/tools/go/types/typeutil golang.org/x/tools/go/gcexportdata golang.org/x/tools/go/packages github.com/google/wire/internal/wire github.com/google/wire/cmd/wire dh_auto_test -O--builddirectory=_build -O--buildsystem=golang - cd _build && go test -vet=off -v -p 16 github.com/google/wire github.com/google/wire/cmd/wire github.com/google/wire/internal/wire + cd _build && go test -vet=off -v -p 15 github.com/google/wire github.com/google/wire/cmd/wire github.com/google/wire/internal/wire ? github.com/google/wire [no test files] ? github.com/google/wire/cmd/wire [no test files] === RUN TestWire @@ -718,23 +761,22 @@ === PAUSE TestWire/VarValue === RUN TestWire/Varargs === PAUSE TestWire/Varargs -=== CONT TestWire/MultipleArgsSameType -=== CONT TestWire/Header -=== CONT TestWire/ReturnError -=== CONT TestWire/InvalidInjector +=== CONT TestWire/BindInjectorArg === CONT TestWire/InterfaceValueNotEnoughArgs === CONT TestWire/Varargs +=== CONT TestWire/FieldsOfValueStruct === CONT TestWire/VarValue === CONT TestWire/ValueIsStruct -=== CONT TestWire/BindInjectorArg +=== CONT TestWire/InterfaceValueInvalidArg0 +=== CONT TestWire/RelativePkg === CONT TestWire/ValueIsInterfaceValue -=== CONT TestWire/ExportedValueDifferentPackage -=== CONT TestWire/NiladicValue -=== CONT TestWire/InterfaceBinding -=== CONT TestWire/InjectInput -=== CONT TestWire/InjectorMissingCleanup -=== CONT TestWire/MultipleMissingInputs -=== CONT TestWire/ReturnError +=== CONT TestWire/FieldsOfStructPointer +=== CONT TestWire/NiladicIdentity +=== CONT TestWire/ProviderSetBindingMissingConcreteType +=== CONT TestWire/PkgImport +=== CONT TestWire/PartialCleanup +=== CONT TestWire/NoopBuild +=== CONT TestWire/NiladicIdentity wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -746,15 +788,64 @@ // Injectors from wire.go: - func injectFoo() (Foo, error) { - foo, err := provideFoo() + func injectedMessage() string { + string2 := provideMessage() + return string2 + } +=== CONT TestWire/InjectorMissingError +=== CONT TestWire/InterfaceValueDoesntImplement +=== CONT TestWire/InterfaceValueInvalidArg0 + wire_test.go:108: /tmp/wire_test2792722802/src/example.com/foo/wire.go:25:13: first argument to InterfaceValue must be a pointer to an interface type; found string +=== CONT TestWire/InterfaceValue +=== CONT TestWire/PartialCleanup + 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 injectBaz() (Baz, func(), error) { + foo, cleanup := provideFoo() + bar, cleanup2, err := provideBar(foo) if err != nil { - return 0, err + cleanup() + return 0, nil, err } - return foo, nil + baz, err := provideBaz(bar) + if err != nil { + cleanup2() + cleanup() + return 0, nil, err + } + return baz, func() { + cleanup2() + cleanup() + }, nil } -=== CONT TestWire/InjectorMissingError -=== CONT TestWire/ExportedValueDifferentPackage +=== CONT TestWire/InterfaceBindingReuse +=== 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/InterfaceBindingNotEnoughArgs +=== CONT TestWire/PkgImport wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -765,25 +856,24 @@ package main import ( - "os" + "example.com/bar" + ) + + import ( + _ "example.com/anon1" + _ "example.com/anon2" ) // Injectors from wire.go: - func injectedFile() *os.File { - file := _wireFileValue - return file + func injectFooBar() FooBar { + foo := provideFoo() + barBar := bar.ProvideBar() + fooBar := provideFooBar(foo, barBar) + return fooBar } - - var ( - _wireFileValue = os.Stdout - ) -=== CONT TestWire/PkgImport -=== 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/ReturnArgumentAsInterface -=== CONT TestWire/VarValue +=== CONT TestWire/InterfaceBindingInvalidArg0 +=== CONT TestWire/FieldsOfValueStruct wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -793,18 +883,45 @@ package main + import ( + "example.com/bar" + "example.com/baz" + "example.com/foo" + "fmt" + ) + // Injectors from wire.go: - func injectedMessage() string { - string2 := _wireStringValue - return string2 + func newBazService() *baz.Service { + config := _wireConfigValue + fooConfig := config.Foo + service := foo.New(fooConfig) + barConfig := config.Bar + barService := bar.New(barConfig, service) + bazService := &baz.Service{ + Foo: service, + Bar: barService, + } + return bazService } var ( - _wireStringValue = msg + _wireConfigValue = &baz.Config{ + Foo: &foo.Config{1}, + Bar: &bar.Config{2}, + } ) -=== CONT TestWire/ReservedKeywords -=== CONT TestWire/BindInjectorArg + + // wire.go: + + func main() { + svc := newBazService() + fmt.Println(svc.String()) + } +=== CONT TestWire/InterfaceBindingDoesntImplement +=== CONT TestWire/ValueIsInterfaceValue + wire_test.go:108: /tmp/wire_test154307651/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/RelativePkg wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -816,12 +933,12 @@ // Injectors from wire.go: - func inject(foo Foo) *Bar { - bar := NewBar(foo) - return bar + func injectedMessage() string { + string2 := provideMessage() + return string2 } -=== CONT TestWire/RelativePkg -=== CONT TestWire/InjectInput +=== CONT TestWire/InterfaceBinding +=== CONT TestWire/FieldsOfStructPointer wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -833,23 +950,18 @@ // Injectors from wire.go: - func injectFooBar(foo Foo) FooBar { - bar := provideBar() - fooBar := provideFooBar(foo, bar) - return fooBar + func injectedMessage() string { + s := provideS() + string2 := s.Foo + return string2 } -=== CONT TestWire/ProviderSetBindingMissingConcreteType -=== CONT TestWire/MultipleMissingInputs - wire_test.go:108: /tmp/wire_test3220758957/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_test3220758957/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_test3220758957/src/example.com/foo/foo.go:29:6) - wire_test.go:108: /tmp/wire_test3220758957/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_test3220758957/src/example.com/foo/foo.go:29:6) - wire_test.go:108: /tmp/wire_test3220758957/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_test3220758957/src/example.com/foo/foo.go:37:6) - needed by example.com/foo.Zap in provider "provideZap" (/tmp/wire_test3220758957/src/example.com/foo/foo.go:41:6) - needed by example.com/foo.Zop in provider "provideZop" (/tmp/wire_test3220758957/src/example.com/foo/foo.go:45:6) -=== CONT TestWire/UnexportedStruct + + func injectedMessagePtr() *string { + s := provideS() + string2 := &s.Foo + return string2 + } +=== CONT TestWire/NoInjectParamNames === CONT TestWire/ValueIsStruct wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -870,8 +982,9 @@ var ( _wireFooValue = Foo{X: 42} ) -=== CONT TestWire/ValueFromFunctionScope +=== CONT TestWire/NoImplicitInterface === CONT TestWire/NiladicValue +=== CONT TestWire/VarValue wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -889,13 +1002,10 @@ } var ( - _wireStringValue = "Hello, World!" + _wireStringValue = msg ) -=== CONT TestWire/ValueConversion -=== CONT TestWire/Header +=== CONT TestWire/BindInjectorArg wire_test.go:164: wire_gen.go: - // This is a sample header file. - // // Code generated by Wire. DO NOT EDIT. //go:generate go run github.com/google/wire/cmd/wire @@ -906,17 +1016,26 @@ // Injectors from wire.go: - func injectFoo() Foo { - foo := provideFoo() - return foo + func inject(foo Foo) *Bar { + bar := NewBar(foo) + return bar } -=== CONT TestWire/ValueChain +=== CONT TestWire/MultipleMissingInputs +=== CONT TestWire/NamingWorstCaseAllInOne +=== CONT TestWire/ProviderSetBindingMissingConcreteType + wire_test.go:108: /tmp/wire_test554544091/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/NamingWorstCase === CONT TestWire/InterfaceValueNotEnoughArgs - wire_test.go:108: /tmp/wire_test2055974907/src/example.com/foo/wire.go:25:38: not enough arguments in call to wire.InterfaceValue + wire_test.go:108: /tmp/wire_test3572004178/src/example.com/foo/wire.go:25:38: not enough arguments in call to wire.InterfaceValue have (string) want (interface{}, interface{}) -=== CONT TestWire/UnusedProviders -=== CONT TestWire/Varargs +=== CONT TestWire/MultipleSimilarPackages +=== CONT TestWire/InjectorMissingError + wire_test.go:108: /tmp/wire_test1828842832/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/MultipleArgsSameType +=== CONT TestWire/InterfaceValueDoesntImplement + wire_test.go:108: /tmp/wire_test925928439/src/example.com/foo/wire.go:26:13: string does not implement io.Reader +=== CONT TestWire/InterfaceBindingReuse wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -928,25 +1047,14 @@ // Injectors from wire.go: - func injectedMessage(t title, lines ...string) string { - string2 := provideMessage(lines...) - return string2 + func injectFooBar() FooBar { + bar := provideBar() + fooBar := provideFooBar(bar, bar) + return fooBar } -=== CONT TestWire/UnexportedValue -=== CONT TestWire/ValueIsInterfaceValue - wire_test.go:108: /tmp/wire_test1128617905/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/StructPointer -=== CONT TestWire/InjectorMissingCleanup - wire_test.go:108: /tmp/wire_test3246571779/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/TwoDeps -=== CONT TestWire/MultipleArgsSameType - wire_test.go:108: /tmp/wire_test444300268/src/example.com/foo/wire.go:25:8: multiple bindings for string - current: - <- argument b to injector function inject (/tmp/wire_test444300268/src/example.com/foo/wire.go:23:1) - previous: - <- argument a to injector function inject (/tmp/wire_test444300268/src/example.com/foo/wire.go:23:1) -=== CONT TestWire/StructWithPreventTag -=== CONT TestWire/InterfaceBinding +=== CONT TestWire/InvalidInjector +=== CONT TestWire/MultipleBindings +=== CONT TestWire/NamingWorstCase wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -956,17 +1064,21 @@ package main + import ( + context2 "context" + ) + // Injectors from wire.go: - func injectFooer() Fooer { - bar := provideBar() - return bar + func inject(context3 context2.Context, err2 struct{}) (context, error) { + mainContext, err := provide(context3) + if err != nil { + return context{}, err + } + return mainContext, nil } -=== CONT TestWire/FieldsOfStructDoNotProvidePtrToField -=== CONT TestWire/InjectorMissingError - wire_test.go:108: /tmp/wire_test815666320/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/FuncArgProvider -=== CONT TestWire/ReturnArgumentAsInterface +=== CONT TestWire/TwoDeps +=== CONT TestWire/MultipleSimilarPackages wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -977,16 +1089,67 @@ package main import ( + "example.com/bar" + "example.com/baz" + "example.com/foo" "fmt" ) // Injectors from wire.go: - func injectStringer(s MyString) fmt.Stringer { - return s + 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 } -=== CONT TestWire/FieldsOfValueStruct -=== CONT TestWire/PkgImport + + // 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) + } + + 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/ValueFromFunctionScope +=== CONT TestWire/NoImplicitInterface + wire_test.go:108: /tmp/wire_test2120669377/src/example.com/foo/wire.go:23:1: inject injectFooer: no provider found for example.com/foo.Fooer, output of injector +=== CONT TestWire/ValueConversion +=== CONT TestWire/InterfaceBindingDoesntImplement + wire_test.go:108: /tmp/wire_test3475000347/src/example.com/foo/wire.go:25:13: string does not implement example.com/foo.Fooer +=== CONT TestWire/ValueChain +=== CONT TestWire/InterfaceBindingInvalidArg0 + wire_test.go:108: /tmp/wire_test1936768487/src/example.com/foo/wire.go:25:13: first argument to Bind must be a pointer to an interface type; found string +=== CONT TestWire/UnusedProviders +=== CONT TestWire/InterfaceBinding wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -996,25 +1159,43 @@ package main - import ( - "example.com/bar" - ) + // Injectors from wire.go: + + func injectFooer() Fooer { + bar := provideBar() + return bar + } +=== CONT TestWire/UnexportedValue +=== CONT TestWire/InterfaceBindingNotEnoughArgs + wire_test.go:108: /tmp/wire_test378568836/src/example.com/foo/wire.go:25:33: not enough arguments in call to wire.Bind + have (*Fooer) + want (interface{}, interface{}) +=== CONT TestWire/NoInjectParamNames + 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 ( - _ "example.com/anon1" - _ "example.com/anon2" + context2 "context" ) // Injectors from wire.go: - func injectFooBar() FooBar { - foo := provideFoo() - barBar := bar.ProvideBar() - fooBar := provideFooBar(foo, barBar) - return fooBar + func inject(contextContext context2.Context, arg struct{}) (context, error) { + mainContext, err := provide(contextContext) + if err != nil { + return context{}, err + } + return mainContext, nil } -=== CONT TestWire/FieldsOfStructPointer -=== CONT TestWire/RelativePkg +=== CONT TestWire/UnexportedStruct +=== CONT TestWire/EmptyVar +=== CONT TestWire/NiladicValue wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1027,11 +1208,15 @@ // Injectors from wire.go: func injectedMessage() string { - string2 := provideMessage() + string2 := _wireStringValue return string2 } -=== CONT TestWire/MultipleBindings -=== CONT TestWire/ReservedKeywords + + var ( + _wireStringValue = "Hello, World!" + ) +=== CONT TestWire/FieldsOfStructDoNotProvidePtrToField +=== CONT TestWire/InterfaceValue wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1041,25 +1226,23 @@ package main + import ( + "io" + "strings" + ) + // Injectors from wire.go: - func injectInterface() Interface { - select2 := provideSelect() - mainInterface := provideInterface(select2) - return mainInterface + func injectedReader() io.Reader { + reader := _wireReaderValue + return reader } - // 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/CopyOtherDecls -=== CONT TestWire/ProviderSetBindingMissingConcreteType - wire_test.go:108: /tmp/wire_test2476076963/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/ExportedValue -=== CONT TestWire/StructPointer + var ( + _wireReaderValue = strings.NewReader("hello world") + ) +=== CONT TestWire/FieldsOfStruct +=== CONT TestWire/NamingWorstCaseAllInOne wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1069,30 +1252,110 @@ package main - // Injectors from wire.go: + import ( + context2 "context" + "fmt" + "os" + "reflect" + ) - func injectFooBar() *FooBar { - foo := provideFoo() - bar := provideBar() - fooBar := &FooBar{ - Foo: foo, - Bar: bar, + // Injectors from foo.go: + + func inject(context3 context2.Context, err2 struct{}) (context, error) { + mainContext, err := Provide(context3) + if err != nil { + return context{}, err } - return fooBar + return mainContext, nil } - func injectEmptyStruct() *Empty { - empty := &Empty{} - return empty + // foo.go: + + type context struct{} + + func main() { + 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) + } + + func Provide(context2_2 context2.Context) (context, error) { + var context3 = context2.Background() + _ = context2_2 + _ = context3 + return context{}, nil } + + func (context) Provide() { + } +=== CONT TestWire/FieldsOfImportedStruct +=== CONT TestWire/MultipleMissingInputs + wire_test.go:108: /tmp/wire_test413318998/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_test413318998/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_test413318998/src/example.com/foo/foo.go:29:6) + wire_test.go:108: /tmp/wire_test413318998/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_test413318998/src/example.com/foo/foo.go:29:6) + wire_test.go:108: /tmp/wire_test413318998/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_test413318998/src/example.com/foo/foo.go:37:6) + needed by example.com/foo.Zap in provider "provideZap" (/tmp/wire_test413318998/src/example.com/foo/foo.go:41:6) + needed by example.com/foo.Zop in provider "provideZop" (/tmp/wire_test413318998/src/example.com/foo/foo.go:45:6) +=== CONT TestWire/FieldsOfCycle +=== CONT TestWire/MultipleBindings + wire_test.go:108: /tmp/wire_test3445431055/src/example.com/foo/wire.go:27:8: multiple bindings for example.com/foo.Foo + current: + <- provider "provideFooAgain" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:39:6) + previous: + <- provider "provideFoo" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:35:6) + wire_test.go:108: /tmp/wire_test3445431055/src/example.com/foo/wire.go:32:8: multiple bindings for example.com/foo.Foo + current: + <- provider "provideFoo" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:35:6) + previous: + <- provider "provideFoo" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:35:6) + <- provider set "Set" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:31:11) + wire_test.go:108: /tmp/wire_test3445431055/src/example.com/foo/wire.go:37:8: multiple bindings for example.com/foo.Foo + current: + <- provider "provideFoo" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:35:6) + previous: + <- provider "provideFoo" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:35:6) + <- provider set "Set" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:31:11) + <- provider set "SuperSet" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:32:16) + wire_test.go:108: /tmp/wire_test3445431055/src/example.com/foo/foo.go:33:32: SetWithDuplicateBindings has multiple bindings for example.com/foo.Foo + current: + <- provider "provideFoo" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:35:6) + <- provider set "Set" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:31:11) + <- provider set "SuperSet" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:32:16) + previous: + <- provider "provideFoo" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:35:6) + <- provider set "Set" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:31:11) + wire_test.go:108: /tmp/wire_test3445431055/src/example.com/foo/wire.go:47:8: multiple bindings for example.com/foo.Foo + current: + <- wire.Value (/tmp/wire_test3445431055/src/example.com/foo/wire.go:47:42) + previous: + <- provider "provideFoo" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:35:6) + wire_test.go:108: /tmp/wire_test3445431055/src/example.com/foo/wire.go:52:8: multiple bindings for example.com/foo.Bar + current: + <- wire.Bind (/tmp/wire_test3445431055/src/example.com/foo/wire.go:52:31) + previous: + <- provider "provideBar" (/tmp/wire_test3445431055/src/example.com/foo/foo.go:43:6) +=== CONT TestWire/ExportedValueDifferentPackage +=== CONT TestWire/MultipleArgsSameType + wire_test.go:108: /tmp/wire_test1670675895/src/example.com/foo/wire.go:25:8: multiple bindings for string + current: + <- argument b to injector function inject (/tmp/wire_test1670675895/src/example.com/foo/wire.go:23:1) + previous: + <- argument a to injector function inject (/tmp/wire_test1670675895/src/example.com/foo/wire.go:23:1) +=== CONT TestWire/ExportedValue +=== 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/ExampleWithMocks -=== CONT TestWire/UnusedProviders - wire_test.go:108: /tmp/wire_test1930110283/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused provider set "unusedSet" - wire_test.go:108: /tmp/wire_test1930110283/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused provider "main.provideUnused" - wire_test.go:108: /tmp/wire_test1930110283/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused value of type string - wire_test.go:108: /tmp/wire_test1930110283/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_test1930110283/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused field "example.com/foo.S".Cfg -=== CONT TestWire/EmptyVar === CONT TestWire/ValueConversion wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1113,11 +1376,8 @@ var ( _wireFooValue = Foo("Hello, World!") ) -=== CONT TestWire/DocComment -=== CONT TestWire/UnexportedStruct - wire_test.go:108: /tmp/wire_test1580196863/src/example.com/foo/wire.go:26:17: foo not exported by package bar -=== CONT TestWire/Cycle -=== CONT TestWire/ValueChain +=== CONT TestWire/Cleanup +=== CONT TestWire/FieldsOfStruct wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1129,26 +1389,16 @@ // Injectors from wire.go: - func injectFooBar() FooBar { - foo := _wireFooValue - fooBar := provideFooBar(foo) - return fooBar + func injectedMessage() string { + s := provideS() + string2 := s.Foo + return string2 } - - var ( - _wireFooValue = Foo(41) - ) -=== CONT TestWire/Struct -=== CONT TestWire/FieldsOfStructDoNotProvidePtrToField - wire_test.go:108: /tmp/wire_test2521553792/src/example.com/foo/wire.go:23:1: inject injectedMessagePtr: no provider found for *string, output of injector -=== CONT TestWire/StructNotAStruct -=== CONT TestWire/UnexportedValue - wire_test.go:108: /tmp/wire_test4247257158/src/example.com/foo/wire.go:24:1: inject injectedMessage: value string can't be used: uses unexported identifier privateMsg -=== CONT TestWire/FieldsOfImportedStruct +=== CONT TestWire/DocComment === CONT TestWire/ValueFromFunctionScope - wire_test.go:108: /tmp/wire_test992791334/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/FieldsOfStruct -=== CONT TestWire/TwoDeps + wire_test.go:108: /tmp/wire_test2840204417/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/Cycle +=== CONT TestWire/ValueChain wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1161,57 +1411,42 @@ // Injectors from wire.go: func injectFooBar() FooBar { - foo := provideFoo() - bar := provideBar() - fooBar := provideFooBar(foo, bar) + foo := _wireFooValue + fooBar := provideFooBar(foo) return fooBar } -=== CONT TestWire/InjectWithPanic + + var ( + _wireFooValue = Foo(41) + ) +=== CONT TestWire/CopyOtherDecls +=== CONT TestWire/UnexportedValue + wire_test.go:108: /tmp/wire_test1662198570/src/example.com/foo/wire.go:24:1: inject injectedMessage: value string can't be used: uses unexported identifier privateMsg +=== CONT TestWire/BuildTagsAllPackages +=== CONT TestWire/FieldsOfStructDoNotProvidePtrToField + wire_test.go:108: /tmp/wire_test1719963446/src/example.com/foo/wire.go:23:1: inject injectedMessagePtr: no provider found for *string, output of injector +=== CONT TestWire/Chain +=== CONT TestWire/FieldsOfCycle + wire_test.go:108: /tmp/wire_test2693711979/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/Struct +=== CONT TestWire/EmptyVar + wire_test.go:108: /tmp/wire_test2591031687/src/example.com/foo/wire.go:24:13: var example.com/foo.myFakeSet struct{} is not a provider or a provider set === CONT TestWire/StructWithPreventTag - wire_test.go:108: /tmp/wire_test703159700/src/example.com/foo/foo.go:45:2: "mu" is prevented from injecting by wire -=== CONT TestWire/NoopBuild -=== CONT TestWire/MultipleBindings - wire_test.go:108: /tmp/wire_test995368903/src/example.com/foo/wire.go:27:8: multiple bindings for example.com/foo.Foo - current: - <- provider "provideFooAgain" (/tmp/wire_test995368903/src/example.com/foo/foo.go:39:6) - previous: - <- provider "provideFoo" (/tmp/wire_test995368903/src/example.com/foo/foo.go:35:6) - wire_test.go:108: /tmp/wire_test995368903/src/example.com/foo/wire.go:32:8: multiple bindings for example.com/foo.Foo - current: - <- provider "provideFoo" (/tmp/wire_test995368903/src/example.com/foo/foo.go:35:6) - previous: - <- provider "provideFoo" (/tmp/wire_test995368903/src/example.com/foo/foo.go:35:6) - <- provider set "Set" (/tmp/wire_test995368903/src/example.com/foo/foo.go:31:11) - wire_test.go:108: /tmp/wire_test995368903/src/example.com/foo/wire.go:37:8: multiple bindings for example.com/foo.Foo - current: - <- provider "provideFoo" (/tmp/wire_test995368903/src/example.com/foo/foo.go:35:6) - previous: - <- provider "provideFoo" (/tmp/wire_test995368903/src/example.com/foo/foo.go:35:6) - <- provider set "Set" (/tmp/wire_test995368903/src/example.com/foo/foo.go:31:11) - <- provider set "SuperSet" (/tmp/wire_test995368903/src/example.com/foo/foo.go:32:16) - wire_test.go:108: /tmp/wire_test995368903/src/example.com/foo/foo.go:33:32: SetWithDuplicateBindings has multiple bindings for example.com/foo.Foo - current: - <- provider "provideFoo" (/tmp/wire_test995368903/src/example.com/foo/foo.go:35:6) - <- provider set "Set" (/tmp/wire_test995368903/src/example.com/foo/foo.go:31:11) - <- provider set "SuperSet" (/tmp/wire_test995368903/src/example.com/foo/foo.go:32:16) - previous: - <- provider "provideFoo" (/tmp/wire_test995368903/src/example.com/foo/foo.go:35:6) - <- provider set "Set" (/tmp/wire_test995368903/src/example.com/foo/foo.go:31:11) - wire_test.go:108: /tmp/wire_test995368903/src/example.com/foo/wire.go:47:8: multiple bindings for example.com/foo.Foo - current: - <- wire.Value (/tmp/wire_test995368903/src/example.com/foo/wire.go:47:42) - previous: - <- provider "provideFoo" (/tmp/wire_test995368903/src/example.com/foo/foo.go:35:6) - wire_test.go:108: /tmp/wire_test995368903/src/example.com/foo/wire.go:52:8: multiple bindings for example.com/foo.Bar - current: - <- wire.Bind (/tmp/wire_test995368903/src/example.com/foo/wire.go:52:31) - previous: - <- provider "provideBar" (/tmp/wire_test995368903/src/example.com/foo/foo.go:43:6) -=== CONT TestWire/PartialCleanup -=== CONT TestWire/FuncArgProvider - wire_test.go:108: /tmp/wire_test1515279631/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/NoInjectParamNames -=== CONT TestWire/FieldsOfValueStruct +=== CONT TestWire/UnusedProviders + wire_test.go:108: /tmp/wire_test744393212/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused provider set "unusedSet" + wire_test.go:108: /tmp/wire_test744393212/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused provider "main.provideUnused" + wire_test.go:108: /tmp/wire_test744393212/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused value of type string + wire_test.go:108: /tmp/wire_test744393212/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_test744393212/src/example.com/foo/wire.go:23:1: inject injectFooBar: unused field "example.com/foo.S".Cfg +=== CONT TestWire/StructPointer +=== CONT TestWire/UnexportedStruct + wire_test.go:108: /tmp/wire_test3236771388/src/example.com/foo/wire.go:26:17: foo not exported by package bar +=== CONT TestWire/StructNotAStruct +=== CONT TestWire/FieldsOfImportedStruct wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1230,8 +1465,7 @@ // Injectors from wire.go: - func newBazService() *baz.Service { - config := _wireConfigValue + func newBazService(config *baz.Config) *baz.Service { fooConfig := config.Foo service := foo.New(fooConfig) barConfig := config.Bar @@ -1243,86 +1477,18 @@ return bazService } - var ( - _wireConfigValue = &baz.Config{ - Foo: &foo.Config{1}, - Bar: &bar.Config{2}, - } - ) - // wire.go: func main() { - svc := newBazService() - fmt.Println(svc.String()) - } -=== CONT TestWire/NamingWorstCaseAllInOne -=== CONT TestWire/ExampleWithMocks - 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: - - // initApp returns a real app. - func initApp() *app { - mainTimer := _wireRealTimeValue - mainGreeter := greeter{ - T: mainTimer, - } - mainApp := &app{ - g: mainGreeter, - } - return mainApp - } - - var ( - _wireRealTimeValue = realTime{} - ) - - // 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 - } - - // 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, + cfg := &baz.Config{ + Foo: &foo.Config{1}, + Bar: &bar.Config{2}, } - return mainAppWithMocks + svc := newBazService(cfg) + fmt.Println(svc.String()) } -=== CONT TestWire/NiladicIdentity -=== CONT TestWire/Cycle - wire_test.go:108: /tmp/wire_test4103450275/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/NamingWorstCase -=== CONT TestWire/FieldsOfStructPointer +=== CONT TestWire/InjectInput +=== CONT TestWire/TwoDeps wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1334,19 +1500,14 @@ // 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 { + foo := provideFoo() + bar := provideBar() + fooBar := provideFooBar(foo, bar) + return fooBar } -=== CONT TestWire/MultipleSimilarPackages -=== CONT TestWire/CopyOtherDecls +=== CONT TestWire/InjectorMissingCleanup +=== CONT TestWire/ExportedValueDifferentPackage wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1357,27 +1518,20 @@ package main import ( - "fmt" + "os" ) - // Injectors from foo.go: - - func injectedMessage() string { - string2 := provideMessage() - return string2 - } - - // foo.go: + // Injectors from wire.go: - func main() { - fmt.Println(injectedMessage()) + func injectedFile() *os.File { + file := _wireFileValue + return file } - // provideMessage provides a friendly user greeting. - func provideMessage() string { - return "Hello, World!" - } -=== CONT TestWire/BuildTagsAllPackages + var ( + _wireFileValue = os.Stdout + ) +=== CONT TestWire/InjectWithPanic === CONT TestWire/ExportedValue wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1402,40 +1556,7 @@ var ( _wireStringValue = bar.PublicMsg ) -=== CONT TestWire/Cleanup -=== CONT TestWire/Struct - 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() FooBar { - foo := provideFoo() - bar := provideBar() - fooBar := FooBar{ - Foo: foo, - Bar: bar, - } - return fooBar - } - - func injectPartFooBar() FooBar { - foo := provideFoo() - fooBar := FooBar{ - Foo: foo, - } - return fooBar - } -=== CONT TestWire/Chain -=== CONT TestWire/StructNotAStruct - wire_test.go:108: /tmp/wire_test2274545333/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/ImportedInterfaceBinding +=== CONT TestWire/InjectInputConflict === CONT TestWire/DocComment wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1459,11 +1580,8 @@ bar := &Bar{} return bar } -=== CONT TestWire/EmptyVar - wire_test.go:108: /tmp/wire_test1876240470/src/example.com/foo/wire.go:24:13: var example.com/foo.myFakeSet struct{} is not a provider or a provider set -=== CONT TestWire/NoImplicitInterface -=== CONT TestWire/InterfaceBindingReuse -=== CONT TestWire/FieldsOfImportedStruct +=== CONT TestWire/BindInterfaceWithValue +=== CONT TestWire/Cleanup wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1473,39 +1591,18 @@ 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}, + func injectBar() (*Bar, func()) { + foo, cleanup := provideFoo() + bar, cleanup2 := provideBar(foo) + return bar, func() { + cleanup2() + cleanup() } - svc := newBazService(cfg) - fmt.Println(svc.String()) } -=== CONT TestWire/InterfaceValueInvalidArg0 -=== CONT TestWire/FieldsOfStruct +=== CONT TestWire/Header +=== CONT TestWire/BuildTagsAllPackages wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1518,12 +1615,22 @@ // Injectors from wire.go: func injectedMessage() string { - s := provideS() - string2 := s.Foo + string2 := _wireStringValue return string2 } -=== CONT TestWire/InterfaceValueDoesntImplement -=== CONT TestWire/InjectWithPanic + + var ( + _wireStringValue = "Hello, World!" + ) +=== CONT TestWire/ImportedInterfaceBinding +=== CONT TestWire/Cycle + wire_test.go:108: /tmp/wire_test3839561280/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/BindInjectorArgPointer +=== CONT TestWire/CopyOtherDecls wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1533,46 +1640,29 @@ package main - // Injectors from wire.go: + import ( + "fmt" + ) + + // Injectors from foo.go: func injectedMessage() string { string2 := provideMessage() return string2 } -=== CONT TestWire/InterfaceValue -=== CONT TestWire/FieldsOfCycle -=== CONT TestWire/PartialCleanup - 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 + // foo.go: - // Injectors from wire.go: + func main() { + fmt.Println(injectedMessage()) + } - 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 + // provideMessage provides a friendly user greeting. + func provideMessage() string { + return "Hello, World!" } -=== CONT TestWire/InterfaceBindingInvalidArg0 -=== CONT TestWire/NamingWorstCaseAllInOne +=== CONT TestWire/FuncArgProvider +=== CONT TestWire/ExampleWithMocks wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1582,51 +1672,61 @@ package main - import ( - context2 "context" - "fmt" - "os" - "reflect" - ) - - // Injectors from foo.go: + // Injectors from wire.go: - func inject(context3 context2.Context, err2 struct{}) (context, error) { - mainContext, err := Provide(context3) - if err != nil { - return context{}, err + // initApp returns a real app. + func initApp() *app { + mainTimer := _wireRealTimeValue + mainGreeter := greeter{ + T: mainTimer, } - return mainContext, nil + mainApp := &app{ + g: mainGreeter, + } + return mainApp } - // foo.go: - - type context struct{} + var ( + _wireRealTimeValue = realTime{} + ) - func main() { - if _, ok := reflect.TypeOf(context{}).MethodByName("Provide"); !ok { - fmt.Println("ERROR: context.Provide renamed") - os.Exit(1) + // 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, } - 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 + return mainApp } - func (context) Provide() { + // 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, + } + return mainAppWithMocks } -=== CONT TestWire/InterfaceBindingNotEnoughArgs -=== CONT TestWire/NoInjectParamNames +=== CONT TestWire/ReturnArgumentAsInterface +=== CONT TestWire/StructWithPreventTag + wire_test.go:108: /tmp/wire_test2003318725/src/example.com/foo/foo.go:45:2: "mu" is prevented from injecting by wire +=== CONT TestWire/ReturnError +=== CONT TestWire/StructNotAStruct + wire_test.go:108: /tmp/wire_test3884159805/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/ReservedKeywords +=== CONT TestWire/InjectInput wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1636,21 +1736,14 @@ package main - import ( - context2 "context" - ) - // 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 injectFooBar(foo Foo) FooBar { + bar := provideBar() + fooBar := provideFooBar(foo, bar) + return fooBar } -=== CONT TestWire/InterfaceBindingDoesntImplement -=== CONT TestWire/NiladicIdentity +=== CONT TestWire/Struct wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1662,12 +1755,26 @@ // Injectors from wire.go: - func injectedMessage() string { - string2 := provideMessage() - return string2 + func injectFooBar() FooBar { + foo := provideFoo() + bar := provideBar() + fooBar := FooBar{ + Foo: foo, + Bar: bar, + } + return fooBar } -=== CONT TestWire/InjectInputConflict -=== CONT TestWire/MultipleSimilarPackages + + func injectPartFooBar() FooBar { + foo := provideFoo() + fooBar := FooBar{ + Foo: foo, + } + return fooBar + } +=== CONT TestWire/InjectorMissingCleanup + wire_test.go:108: /tmp/wire_test1140685645/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/StructPointer wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1677,59 +1784,23 @@ 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}, - } - svc := newMainService(cfg) - fmt.Println(svc.String()) + func injectEmptyStruct() *Empty { + empty := &Empty{} + return empty } -=== CONT TestWire/BindInterfaceWithValue -=== CONT TestWire/NamingWorstCase +=== CONT TestWire/Chain wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1739,21 +1810,14 @@ package main - import ( - context2 "context" - ) - // Injectors from wire.go: - func inject(context3 context2.Context, err2 struct{}) (context, error) { - mainContext, err := provide(context3) - if err != nil { - return context{}, err - } - return mainContext, nil + func injectFooBar() FooBar { + foo := provideFoo() + fooBar := provideFooBar(foo) + return fooBar } -=== CONT TestWire/BindInjectorArgPointer -=== CONT TestWire/Cleanup +=== CONT TestWire/InjectWithPanic wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1765,15 +1829,18 @@ // Injectors from wire.go: - func injectBar() (*Bar, func()) { - foo, cleanup := provideFoo() - bar, cleanup2 := provideBar(foo) - return bar, func() { - cleanup2() - cleanup() - } + func injectedMessage() string { + string2 := provideMessage() + return string2 } -=== CONT TestWire/BuildTagsAllPackages +=== CONT TestWire/InjectInputConflict + wire_test.go:108: /tmp/wire_test238550588/src/example.com/foo/wire.go:24:2: multiple bindings for example.com/foo.Foo + current: + <- provider "provideFoo" (/tmp/wire_test238550588/src/example.com/foo/foo.go:37:6) + <- provider set "Set" (/tmp/wire_test238550588/src/example.com/foo/foo.go:33:11) + previous: + <- argument foo to injector function injectBar (/tmp/wire_test238550588/src/example.com/foo/wire.go:23:1) +=== CONT TestWire/BindInterfaceWithValue wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1783,17 +1850,24 @@ package main + import ( + "io" + "os" + ) + // Injectors from wire.go: - func injectedMessage() string { - string2 := _wireStringValue - return string2 + func inject() io.Writer { + file := _wireFileValue + return file } var ( - _wireStringValue = "Hello, World!" + _wireFileValue = os.Stdout ) -=== CONT TestWire/Chain +=== CONT TestWire/FuncArgProvider + wire_test.go:108: /tmp/wire_test3915291125/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/ReservedKeywords wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1805,12 +1879,19 @@ // Injectors from wire.go: - func injectFooBar() FooBar { - foo := provideFoo() - fooBar := provideFooBar(foo) - return fooBar + func injectInterface() Interface { + select2 := provideSelect() + mainInterface := provideInterface(select2) + return mainInterface } -=== CONT TestWire/InterfaceBindingReuse + + // 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/ImportedInterfaceBinding wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1820,17 +1901,20 @@ package main + import ( + "example.com/foo" + ) + // Injectors from wire.go: - func injectFooBar() FooBar { + func injectFooer() foo.Fooer { bar := provideBar() - fooBar := provideFooBar(bar, bar) - return fooBar + return bar } -=== CONT TestWire/InterfaceValueInvalidArg0 - wire_test.go:108: /tmp/wire_test794065446/src/example.com/foo/wire.go:25:13: first argument to InterfaceValue must be a pointer to an interface type; found string -=== CONT TestWire/ImportedInterfaceBinding +=== CONT TestWire/Header wire_test.go:164: wire_gen.go: + // This is a sample header file. + // // Code generated by Wire. DO NOT EDIT. //go:generate go run github.com/google/wire/cmd/wire @@ -1839,21 +1923,13 @@ package main - import ( - "example.com/foo" - ) - // Injectors from wire.go: - func injectFooer() foo.Fooer { - bar := provideBar() - return bar + func injectFoo() Foo { + foo := provideFoo() + return foo } -=== CONT TestWire/InterfaceValueDoesntImplement - wire_test.go:108: /tmp/wire_test885704790/src/example.com/foo/wire.go:26:13: string does not implement io.Reader -=== CONT TestWire/NoImplicitInterface - wire_test.go:108: /tmp/wire_test2071697451/src/example.com/foo/wire.go:23:1: inject injectFooer: no provider found for example.com/foo.Fooer, output of injector -=== CONT TestWire/InterfaceValue +=== CONT TestWire/ReturnError wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1863,43 +1939,16 @@ package main - import ( - "io" - "strings" - ) - // Injectors from wire.go: - func injectedReader() io.Reader { - reader := _wireReaderValue - return reader + func injectFoo() (Foo, error) { + foo, err := provideFoo() + if err != nil { + return 0, err + } + return foo, nil } - - var ( - _wireReaderValue = strings.NewReader("hello world") - ) -=== CONT TestWire/InterfaceBindingInvalidArg0 - wire_test.go:108: /tmp/wire_test3857960421/src/example.com/foo/wire.go:25:13: first argument to Bind must be a pointer to an interface type; found string -=== CONT TestWire/FieldsOfCycle - wire_test.go:108: /tmp/wire_test962753097/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/InterfaceBindingNotEnoughArgs - wire_test.go:108: /tmp/wire_test1220025496/src/example.com/foo/wire.go:25:33: not enough arguments in call to wire.Bind - have (*Fooer) - want (interface{}, interface{}) -=== CONT TestWire/InjectInputConflict - wire_test.go:108: /tmp/wire_test360249880/src/example.com/foo/wire.go:24:2: multiple bindings for example.com/foo.Foo - current: - <- provider "provideFoo" (/tmp/wire_test360249880/src/example.com/foo/foo.go:37:6) - <- provider set "Set" (/tmp/wire_test360249880/src/example.com/foo/foo.go:33:11) - previous: - <- argument foo to injector function injectBar (/tmp/wire_test360249880/src/example.com/foo/wire.go:23:1) -=== CONT TestWire/InterfaceBindingDoesntImplement - wire_test.go:108: /tmp/wire_test838216807/src/example.com/foo/wire.go:25:13: string does not implement example.com/foo.Fooer -=== CONT TestWire/BindInterfaceWithValue +=== CONT TestWire/ReturnArgumentAsInterface wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1910,20 +1959,14 @@ package main import ( - "io" - "os" + "fmt" ) // Injectors from wire.go: - func inject() io.Writer { - file := _wireFileValue - return file + func injectStringer(s MyString) fmt.Stringer { + return s } - - var ( - _wireFileValue = os.Stdout - ) === CONT TestWire/BindInjectorArgPointer wire_test.go:164: wire_gen.go: // Code generated by Wire. DO NOT EDIT. @@ -1940,77 +1983,77 @@ bar := NewBar(foo) return bar } ---- PASS: TestWire (0.02s) - --- PASS: TestWire/ReturnError (8.48s) - --- PASS: TestWire/ExportedValueDifferentPackage (8.60s) - --- PASS: TestWire/InvalidInjector (8.89s) - --- PASS: TestWire/VarValue (8.96s) - --- PASS: TestWire/BindInjectorArg (9.10s) - --- PASS: TestWire/InjectInput (9.39s) - --- PASS: TestWire/MultipleMissingInputs (10.05s) - --- PASS: TestWire/ValueIsStruct (10.10s) - --- PASS: TestWire/NiladicValue (10.14s) - --- PASS: TestWire/Header (10.15s) - --- PASS: TestWire/InterfaceValueNotEnoughArgs (10.15s) - --- PASS: TestWire/Varargs (10.20s) - --- PASS: TestWire/ValueIsInterfaceValue (10.21s) - --- PASS: TestWire/InjectorMissingCleanup (10.21s) - --- PASS: TestWire/MultipleArgsSameType (10.31s) - --- PASS: TestWire/InterfaceBinding (10.35s) - --- PASS: TestWire/InjectorMissingError (3.22s) - --- PASS: TestWire/ReturnArgumentAsInterface (2.99s) - --- PASS: TestWire/PkgImport (3.56s) - --- PASS: TestWire/RelativePkg (3.18s) - --- PASS: TestWire/ReservedKeywords (3.37s) - --- PASS: TestWire/ProviderSetBindingMissingConcreteType (3.11s) - --- PASS: TestWire/StructPointer (2.65s) - --- PASS: TestWire/UnusedProviders (2.70s) - --- PASS: TestWire/ValueConversion (2.72s) - --- PASS: TestWire/UnexportedStruct (2.86s) - --- PASS: TestWire/ValueChain (2.82s) - --- PASS: TestWire/FieldsOfStructDoNotProvidePtrToField (3.03s) - --- PASS: TestWire/UnexportedValue (3.35s) - --- PASS: TestWire/ValueFromFunctionScope (3.45s) - --- PASS: TestWire/TwoDeps (3.76s) - --- PASS: TestWire/StructWithPreventTag (3.74s) - --- PASS: TestWire/MultipleBindings (2.21s) - --- PASS: TestWire/FuncArgProvider (3.31s) - --- PASS: TestWire/FieldsOfValueStruct (3.61s) - --- PASS: TestWire/ExampleWithMocks (3.30s) - --- PASS: TestWire/Cycle (3.38s) - --- PASS: TestWire/FieldsOfStructPointer (4.49s) - --- PASS: TestWire/CopyOtherDecls (4.63s) - --- PASS: TestWire/ExportedValue (4.44s) - --- PASS: TestWire/Struct (4.24s) - --- PASS: TestWire/StructNotAStruct (3.88s) - --- PASS: TestWire/DocComment (4.45s) - --- PASS: TestWire/EmptyVar (4.46s) - --- PASS: TestWire/FieldsOfImportedStruct (3.92s) - --- PASS: TestWire/FieldsOfStruct (4.06s) - --- PASS: TestWire/InjectWithPanic (4.09s) - --- PASS: TestWire/NoopBuild (4.58s) - --- PASS: TestWire/PartialCleanup (4.60s) - --- PASS: TestWire/NamingWorstCaseAllInOne (4.27s) - --- PASS: TestWire/NoInjectParamNames (4.98s) - --- PASS: TestWire/NiladicIdentity (4.48s) - --- PASS: TestWire/MultipleSimilarPackages (4.02s) - --- PASS: TestWire/NamingWorstCase (4.45s) - --- PASS: TestWire/Cleanup (3.98s) - --- PASS: TestWire/BuildTagsAllPackages (4.41s) - --- PASS: TestWire/Chain (4.75s) - --- PASS: TestWire/InterfaceBindingReuse (4.66s) - --- PASS: TestWire/InterfaceValueInvalidArg0 (4.56s) - --- PASS: TestWire/ImportedInterfaceBinding (4.77s) - --- PASS: TestWire/InterfaceValueDoesntImplement (4.50s) - --- PASS: TestWire/NoImplicitInterface (5.15s) - --- PASS: TestWire/InterfaceValue (4.53s) - --- PASS: TestWire/InterfaceBindingInvalidArg0 (3.52s) - --- PASS: TestWire/FieldsOfCycle (4.30s) - --- PASS: TestWire/InterfaceBindingNotEnoughArgs (3.23s) - --- PASS: TestWire/InjectInputConflict (2.70s) - --- PASS: TestWire/InterfaceBindingDoesntImplement (3.34s) - --- PASS: TestWire/BindInterfaceWithValue (2.71s) - --- PASS: TestWire/BindInjectorArgPointer (2.71s) +--- PASS: TestWire (0.07s) + --- PASS: TestWire/NiladicIdentity (20.80s) + --- PASS: TestWire/NoopBuild (21.27s) + --- PASS: TestWire/InterfaceValueInvalidArg0 (21.36s) + --- PASS: TestWire/PartialCleanup (21.43s) + --- PASS: TestWire/Varargs (21.50s) + --- PASS: TestWire/PkgImport (21.50s) + --- PASS: TestWire/FieldsOfValueStruct (21.55s) + --- PASS: TestWire/RelativePkg (21.56s) + --- PASS: TestWire/FieldsOfStructPointer (21.55s) + --- PASS: TestWire/ValueIsInterfaceValue (21.56s) + --- PASS: TestWire/ValueIsStruct (21.58s) + --- PASS: TestWire/BindInjectorArg (21.65s) + --- PASS: TestWire/VarValue (21.66s) + --- PASS: TestWire/ProviderSetBindingMissingConcreteType (21.80s) + --- PASS: TestWire/InterfaceValueNotEnoughArgs (22.05s) + --- PASS: TestWire/InjectorMissingError (16.67s) + --- PASS: TestWire/InterfaceValueDoesntImplement (16.29s) + --- PASS: TestWire/InterfaceBindingReuse (16.15s) + --- PASS: TestWire/NamingWorstCase (15.82s) + --- PASS: TestWire/MultipleSimilarPackages (15.67s) + --- PASS: TestWire/NoImplicitInterface (16.14s) + --- PASS: TestWire/InterfaceBindingDoesntImplement (16.19s) + --- PASS: TestWire/InterfaceBindingInvalidArg0 (16.23s) + --- PASS: TestWire/InterfaceBinding (16.29s) + --- PASS: TestWire/NoInjectParamNames (16.32s) + --- PASS: TestWire/InterfaceBindingNotEnoughArgs (16.42s) + --- PASS: TestWire/NiladicValue (16.33s) + --- PASS: TestWire/InterfaceValue (16.59s) + --- PASS: TestWire/NamingWorstCaseAllInOne (16.29s) + --- PASS: TestWire/MultipleMissingInputs (16.35s) + --- PASS: TestWire/MultipleBindings (8.38s) + --- PASS: TestWire/MultipleArgsSameType (11.49s) + --- PASS: TestWire/InvalidInjector (13.76s) + --- PASS: TestWire/ValueConversion (13.88s) + --- PASS: TestWire/FieldsOfStruct (13.67s) + --- PASS: TestWire/ValueFromFunctionScope (13.94s) + --- PASS: TestWire/ValueChain (13.98s) + --- PASS: TestWire/UnexportedValue (13.87s) + --- PASS: TestWire/FieldsOfStructDoNotProvidePtrToField (13.86s) + --- PASS: TestWire/FieldsOfCycle (13.83s) + --- PASS: TestWire/EmptyVar (13.95s) + --- PASS: TestWire/UnusedProviders (14.10s) + --- PASS: TestWire/UnexportedStruct (14.04s) + --- PASS: TestWire/FieldsOfImportedStruct (14.03s) + --- PASS: TestWire/TwoDeps (14.38s) + --- PASS: TestWire/ExportedValueDifferentPackage (13.20s) + --- PASS: TestWire/ExportedValue (10.52s) + --- PASS: TestWire/DocComment (12.73s) + --- PASS: TestWire/Cleanup (12.80s) + --- PASS: TestWire/BuildTagsAllPackages (12.93s) + --- PASS: TestWire/Cycle (13.04s) + --- PASS: TestWire/CopyOtherDecls (13.00s) + --- PASS: TestWire/ExampleWithMocks (13.35s) + --- PASS: TestWire/StructWithPreventTag (13.17s) + --- PASS: TestWire/StructNotAStruct (13.13s) + --- PASS: TestWire/InjectInput (13.14s) + --- PASS: TestWire/Struct (13.33s) + --- PASS: TestWire/InjectorMissingCleanup (13.12s) + --- PASS: TestWire/StructPointer (13.39s) + --- PASS: TestWire/Chain (13.52s) + --- PASS: TestWire/InjectWithPanic (10.73s) + --- PASS: TestWire/InjectInputConflict (10.79s) + --- PASS: TestWire/BindInterfaceWithValue (8.85s) + --- PASS: TestWire/FuncArgProvider (8.87s) + --- PASS: TestWire/ReservedKeywords (8.55s) + --- PASS: TestWire/ImportedInterfaceBinding (9.20s) + --- PASS: TestWire/Header (9.47s) + --- PASS: TestWire/ReturnError (8.95s) + --- PASS: TestWire/ReturnArgumentAsInterface (9.39s) + --- PASS: TestWire/BindInjectorArgPointer (9.50s) === RUN TestUnexport --- PASS: TestUnexport (0.00s) === RUN TestExport @@ -2066,7 +2109,7 @@ --- PASS: TestDisambiguate/disambiguate("select",_map[]) (0.00s) --- PASS: TestDisambiguate/disambiguate("var",_map[]) (0.00s) PASS -ok github.com/google/wire/internal/wire 23.870s +ok github.com/google/wire/internal/wire 75.677s create-stamp debian/debhelper-build-stamp dh_testroot -O--builddirectory=_build -O--buildsystem=golang dh_prep -O--builddirectory=_build -O--buildsystem=golang @@ -2103,12 +2146,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/2764922/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/2764922/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/1539067 and its subdirectories -I: Current time: Tue May 21 05:58:13 -12 2024 -I: pbuilder-time-stamp: 1716314293 +I: removing directory /srv/workspace/pbuilder/2764922 and its subdirectories +I: Current time: Thu Apr 20 01:42:08 +14 2023 +I: pbuilder-time-stamp: 1681904528