-
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: go1.16 default go build
behavior changes seem detrimental to developer flow
#44212
Comments
This is related to the intentional change in proposal #40728.
Rather than running @jayconrod will know if there were improvements to the suggestions printed by |
Can you please include what was the exact output printed from |
note the old behaviour is still available with |
Yeah, that's what I've been doing today, though just I guess the main issue is that I think this is a significant departure, and feels like a regression, from historical Go tooling experience. While I think I understand the reasoning (prefer explicit), it's been a source of frustration. I'm also quite a bit more familiar with Go than many of the Go developers that I work with, so I'd imagine the output being shown, to I see that Finally, I'm trying to read more into the change proposal and link chains above, so I'll try to respond with some hopefully more educated opinions later. |
go build
behavior changes seem detrimental to developer flow
As Dmitri mentioned, this change in default behavior was discussed and approved in #40728. It's too late to change that for 1.16, and we'd need significant new information to reopen that discussion. If there's something specific we can do to make the experience better (better diagnostic message; simpler command to accomplish a common task), we'd be happy to consider that. I expect there will be a few rough edges, since Just for background, the feedback we've gotten on the previous behavior ( |
Yeah, that's understandable. With the reading provided it seems it was a wider reaching change than I'd initially hoped. I think my thoughts on a better experience would be around providing error feedback, or Is there any way I'd also be glad to sling some code on this too, though I've still only prepped for the the process of contributing to Go, and haven't actually done it yet. |
That's entirely fair. I've filed a couple issues about related errors (like #43653). More issues with specific examples would be helpful, too.
I think I've fixed most cases where that wasn't happening, though it's possible there are still edge cases we haven't seen yet. #44129 is probably the biggest issue I know of. If it comes up often, we could backport the fix in 1.16.1. Please file issues if you see anything else like that.
Help is welcome! :) Feel free to @ me on any open issue, and I can help you get started. |
Sounds good, and I may take you up on that. Appreciate the responsiveness and as always, the Kubernetes community spirit. :D |
…go#44212) Signed-off-by: Danielle Adams <danielle.adams@salesforce.com>
…go#44212) Signed-off-by: Danielle Adams <danielle.adams@salesforce.com>
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?
Tried to build a package in a development cycle from within vim while adding dependencies the way I have for 6+ years.
What did you expect to see?
Compiler errors relating to the code in my repository.
What did you see instead?
go build
errors out telling me that a package is not provided by anything ingo.mod
and that I need to add it withgo get
After running
go get
to add the package, I attempt another build and am met with another error telling me that there is a "missing go.sum entry for module providing package ... imported by ..." and prints out helpful commands, but does not keep me in the flow of development as Go has historically been great at by default.I understand the reasons behind the desire to not constantly change go.mod and go.sum invisibly to the user, but I think it's worth rethinking this default behavior as it seems very much contrary to the ethos of go tooling up to this point. I've always appreciated when things just work while also trying to help me keep myself safe.
The text was updated successfully, but these errors were encountered: