Open zephyrtronium opened 5 years ago
Reading through clean.go, it looks like there are three reasonable options:
cleanFile
and cleanExt
to allRemove
, which currently only contains possible executable file outputs. This is an easy fix, and I'm currently trying it locally..so
from cleanExt
and instead remove those files in the way that *.exe
is removed. This seems appropriate because a shared object in the package directory is probably from any of the various shared build modes rather than from SWIG in the modern era. I'm still uncomfortable with any files being removed without being printed in -n
and -x
.// TODO: Remove once Makefiles are forgotten.
It's been over seven years since the go command was released, and almost five years since go generate. It's impossible to be certain that no one is using Makefiles, but at the very least, the go command isn't included in (the text of) the Go 1 compatibility promise.Change https://golang.org/cl/339789 mentions this issue: cmd/go: go clean should list all deleted files
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
rm -f
includingplugintest.so
, orplugintest.so
still present in the directory.What did you see instead?
plugintest.so
was removed bygo clean
, but not listed in its output. It seems that any files removed via https://github.com/golang/go/blob/master/src/cmd/go/internal/clean/clean.go#L323 aren't printed, which includes*.so
(which the documentation says come from SWIG).