-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: build not respecting empty go mod files #35070
Comments
So it looks like Several parts of this seem wrong. |
@bcmills @jayconrod if I'd like to work on this, how do I convey that? Do I just submit a PR and hope no one else has worked on this already? Haha. I didn't see this covered in the contribution guide! |
If somebody is working on it a |
@gdholtslander Just submit a PR or Gerrit CL. Make sure to include a regression test in src/cmd/go/testdata/script. GitHub doesn't let us assign issues outside the org, but commenting here is clear enough. @gertcuykens That's definitely how I felt when I started working on cmd/go. It's admittedly not the most approachable code base. |
@jayconrod so in the future if I'm interested in an issue, just make a comment stating my intention to start working on it? Thanks 👍 |
@bcmills @jayconrod This is currently marked for Go 1.14; anything that needs to be done here for the release, or should this move to the backlog milestone? |
I think we need to figure out the exact conditions in which |
Sorry @bcmills, I haven't made time to investigate this yet. I have enjoyed reading through the go command testing utilities though! |
I won't be able to take this on right now. If someone else wants to have a go at it please feel free. |
Change https://golang.org/cl/211597 mentions this issue: |
Change https://golang.org/cl/212198 mentions this issue: |
Change https://golang.org/cl/234107 mentions this issue: |
Didn't happen for 1.15, moving milestone to 1.16. |
go version devel +8c6876e9a4 Thu Oct 17 22:27:31 2019 +0000 darwin/amd64
go env
Don't think it's desired behavior if you do
go build
by accident in a directory with no go files to automatically fill the emptygo.mod
file. Especially when a emptygo.mod
file was specifically designed to exclude that directory from the actual module. I know about-mod=readonly
but when there are no go files it should make a exception and leave that file alone even without the-mod=readonly
EDIT:
go doc also modifies a go.mod file in gopath
The text was updated successfully, but these errors were encountered: