Skip to content

cmd/go: should help users understand when a new GOOS or GOARCH breaks their build #28812

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

Closed
theckman opened this issue Nov 15, 2018 · 6 comments
Labels
GoCommand cmd/go NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@theckman
Copy link
Contributor

We ran to an interesting issue today in the Go newbies channel on the Slack workspace, specifically around a user's build breaking in between Go v1.10.x and v1.11.x. I'm not sure if there's really a tenable solution here, but I thought it was worth starting a discussion with the Go authors.

This user upgraded from Go v1.10.x to Go v1.11.2 with no other changes to their code, and they were then met with build failures:

./swaguidist.go:15:38: undefined: swaggerUiBundleJs
./swaguidist.go:17:38: undefined: swaggerUiStandalonePresetJs

When the user tried to figure out what was wrong, they incorrectly asserted that because some of the files in the package were large the compiler was ignoring them. They reached out to the Slack workspace to see whether anyone was aware of such a limitation, but thankfully we happened to spot the files ending in *_js.go.

While I think it's ideal to expect everyone to read the release notes in their entirety, I don't think we'll ever get to that place. It makes me wonder if there're are any options available to us that would make these things a little more approachable and actionable (especially to newbies), versus something like a variable not defined error.

@theckman theckman changed the title cmd/go: should help users understand when a new GOOS breaks their build cmd/go: should help users understand when a new change breaks their build Nov 15, 2018
@theckman theckman changed the title cmd/go: should help users understand when a new change breaks their build cmd/go: should help users understand when a new Go language change breaks their build Nov 15, 2018
@ianlancetaylor ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 15, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.12 milestone Nov 15, 2018
@ianlancetaylor
Copy link
Member

Yes, this change in the handling of file names is an ongoing slow moving problem.

@cznic
Copy link
Contributor

cznic commented Nov 15, 2018

FTR: This is not about a language change breaking builds. The build system is not the language.

@jimmyfrasche
Copy link
Member

Should the mechanism introduced in #28221 be used to ignore build constraints that were not yet reserved by the language version recorded by the module?

@ianlancetaylor ianlancetaylor changed the title cmd/go: should help users understand when a new Go language change breaks their build cmd/go: should help users understand when a new GOOS or GOARCH breaks their build Nov 16, 2018
@ianlancetaylor
Copy link
Member

@cznic Thanks, updated issue title.

@jimmyfrasche I worry that relying on that is likely to increase confusion rather than decrease it.

@bcmills
Copy link
Contributor

bcmills commented Jan 17, 2019

As confusing as the language-version switch may be, I suspect it's the least-confusing of the options: at the very least, it preserves the property that programs that were correctly-structured in one release remain correctly-structured over time.

@bcmills bcmills added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jan 17, 2019
@bcmills bcmills modified the milestones: Go1.12, Go1.13 Jan 17, 2019
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 17, 2019
@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
@seankhliao seankhliao added the GoCommand cmd/go label Feb 22, 2025
@matloob
Copy link
Contributor

matloob commented Apr 1, 2025

I don't think we've made any recent additions to goos and goarch suffixes that are used to select files for the build, but if we do, we should tie them to the version of the go.mod file. That should probably be a different issue though. Closing this one.

@matloob matloob closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

10 participants