New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: go clean doesn’t remove the binary whose name is defined in go.mod #41656
Labels
FrozenDueToAge
GoCommand
cmd/go
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Comments
andybons
changed the title
go clean doens't remove the binary whose name is defined in go.mod
cmd/go: go clean doesn’t remove the binary whose name is defined in go.mod
Sep 29, 2020
andybons
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Sep 29, 2020
jayconrod
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Sep 29, 2020
|
I'll work on this. OK? |
Change https://golang.org/cl/262677 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Oct 22, 2020
Now "go clean" can remove binary as expected, when module enabled and the module name isn't "main" or the name of folder. Fixes issue #41656 Change-Id: I54b9435ece045e03a12dc230efe84c8dd381a07c GitHub-Last-Rev: f4ea2d8 GitHub-Pull-Request: #41999 Reviewed-on: https://go-review.googlesource.com/c/go/+/262677 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Jay Conrod <jayconrod@google.com> Trust: Bryan C. Mills <bcmills@google.com>
This issue has been fixed now, I'll close it. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
GoCommand
cmd/go
NeedsFix
The path to resolution is known, but the work has not been done.
Hi,
go clean
doesn't remove the built binary, the filename of binary is the same as themodule directive
in go.mod.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?
file: goclean/main.go
file: goclean/go.mod, it defines the
module a.b.c
After run
cd goclean; go build
, we get a binarygoclean/a.b.c
, then I runcd goclean; go clean -x
, it says only the following list will be removedmain main.exe goclean goclean.exe ...test ...test.exe
. Noa.b.c, a.b.c.exe, a.b.c.test, a.b.c.test.exe
is listed.I want to know if it's a bug, or it is designed like that.
What did you expect to see?
I want to see a.b.c, a.b.c.exe, a.b.c.test and a.b.c.test.exe are cleaned, too.
What did you see instead?
The files, a.b.c, a.b.c.exe, a.b.c.test and a.b.c.test.exe are kept.
The text was updated successfully, but these errors were encountered: