The only weird thing I've done is some manual upgrade of go (Ubuntu had not 
gotten modules so I did some wget thing to get a newer version I think). I 
do go build in bash because the modules thing has broken VS Code (or I have 
a mismatch of VS Code plugins, etc. etc. -- all acceptable pains). I 
sometimes do go test but not that often. I'm working with go buffalo to 
make a web-thing, and I'm also working with sqlboiler.

Here are some environment details:

$ bash --version
bash --version
GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
[...]

$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/<username>/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/<username>/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR="/tmp/go-builds"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 
-fdebug-prefix-map=/tmp/go-builds/go-build308894691=/tmp/go-build 
-gno-record-gcc-switches"

$ env | grep "^G"
GDM_LANG=en_US
GTK_OVERLAY_SCROLLING=0
GLADE_CATALOG_PATH=:
GLADE_MODULE_PATH=:
GO111MODULE=on
GOTMPDIR=/tmp/go-builds
GLADE_PIXMAP_PATH=:
GTK_MODULES=gail:atk-bridge
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
GDMSESSION=xubuntu

$ go version
go version go1.12.6 linux/amd64

$ cat /etc/issue
Ubuntu 18.04.3 LTS \n \l

$ ls /tmp | grep go-build | wc -l
38302

$ ls /tmp/go-builds | grep go-build | wc -l
0

$ uptime
 11:37:18 up 4 days,  3:20,  1 user,  load average: 0,58, 0,54, 0,47



Den fredag 23 augusti 2019 kl. 16:44:14 UTC+2 skrev Ian Lance Taylor:
>
> On Fri, Aug 23, 2019 at 7:34 AM Peter Weinberger (温博格) <p...@google.com 
> <javascript:>> wrote: 
> > 
> > This is routinely happening to me too, on linux. My go commands are go 
> build *.go 
> > The left-over directories are empty 
> > I'm on go1.12.5 linux/amd64 
>
> Well, that is ungood.  And I don't see it myself.  Can you figure out 
> a way to reproduce the problem? 
>
> Ian 
>
> > On Fri, Aug 23, 2019 at 10:04 AM Ian Lance Taylor <ia...@golang.org 
> <javascript:>> wrote: 
> >> 
> >> On Thu, Aug 22, 2019 at 7:55 AM <per...@gmail.com <javascript:>> 
> wrote: 
> >> > 
> >> > I get a bloated /tmp-dir (in just a few days I get tens of thousands 
> of folders named /tmp/go-build828718408 etc.) 
> >> 
> >> That is odd in itself.  The go-buildNNNNN directories should normally 
> >> be deleted when the go command completes.  Are you routinely killing 
> >> your go commands before they complete and have a chance to remove the 
> >> temporary directory? 
> >> 
> >> 
> >> > so I tried to set $GOTMPDIR, but nothing ends up there. (From what I 
> understand of the documentation the purpose of GOTMPDIR is to move tmp 
> stuff, see e.g. line 1471 of 
> https://golang.org/src/cmd/go/alldocs.go?h=GOTMPDIR, or release notes of 
> 1.10 https://golang.org/doc/go1.10). 
> >> > 
> >> > Am I using things wrong? 
> >> > 
> >> > $ go version 
> >> > go version go1.12.6 linux/amd64 
> >> > 
> >> > $ echo $GOTMPDIR 
> >> > /tmp/go-builds 
> >> > 
> >> > $ ls $GOTMPDIR 
> >> > please-end-up-here.txt 
> >> > 
> >> > $ go build/test/this/that/etc 
> >> > [...] 
> >> > 
> >> > $ ls $GOTMPDIR 
> >> > please-end-up-here.txt 
> >> 
> >> Setting GOTMPDIR should work.  What shell are you using?  Did you 
> >> "export GOTMPDIR"? 
> >> 
> >> Note that, as mentioned above, an ordinary go build will create a 
> >> temporary directory in GOTMPDIR and then delete it.  So it's normal to 
> >> not see anything there after the go command completes.  You can verify 
> >> the directory it uses by running "go build -work" (in which case it 
> >> will not delete the temporary directory). 
> >> 
> >> Ian 
> >> 
> >> -- 
> >> You received this message because you are subscribed to the Google 
> Groups "golang-nuts" group. 
> >> To unsubscribe from this group and stop receiving emails from it, send 
> an email to golan...@googlegroups.com <javascript:>. 
> >> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/CAOyqgcU-U_2Rz6UB1TUijdVyRSR-BJxxQdXgGVbJz4dX2p3vaA%40mail.gmail.com.
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/b99dac0e-6a74-42cd-b0e2-8785769fc9cf%40googlegroups.com.

Reply via email to