Skip to content
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: mod tidy should ignore missing standard library packages [1.15 backport] #44792

Closed
gopherbot opened this issue Mar 4, 2021 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

gopherbot commented Mar 4, 2021

@jayconrod requested issue #44557 (fixed in 56d52e6 for Go 1.17) to be considered for backport to the next 1.15 minor release.

@gopherbot Please backport to 1.15 and 1.16. These errors are being reported more frequently since popular new packages were introduced in 1.16.

@dmitshur
Copy link
Contributor

dmitshur commented Mar 4, 2021

Approving per discussion in a release meeting. This backport applies to both 1.16 (#44793) and 1.15 (this issue).

@dmitshur dmitshur added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Mar 4, 2021
@gopherbot
Copy link
Author

Change https://golang.org/cl/298950 mentions this issue: [release-branch.go1.15] cmd/go: don't report missing std import errors for tidy and vendor

@toothrot toothrot modified the milestones: Go1.15.9, Go1.15.10 Mar 10, 2021
@gopherbot
Copy link
Author

Closed by merging ba3dc70 to release-branch.go1.15.

gopherbot pushed a commit that referenced this issue Mar 10, 2021
…s for tidy and vendor

'go mod tidy' and 'go mod vendor' normally report errors when a
package can't be imported, even if the import appears in a file that
wouldn't be compiled by the current version of Go. These errors are
common for packages introduced in higher versions of Go, like "embed"
in 1.16.

This change causes 'go mod tidy' and 'go mod vendor' to ignore
missing package errors if the import path appears to come from the
standard library because it lacks a dot in the first path element.

NOTE: This change is not a clean cherry-pick of CL 298749 because
parts of modload were substantially rewritten after 1.15.

Fixes #44792
Updates #27063

Change-Id: I61d6443e77ab95fd8c0d1514f57ef4c8885a77cc
Reviewed-on: https://go-review.googlesource.com/c/go/+/298749
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
(cherry picked from commit 56d52e6)
Reviewed-on: https://go-review.googlesource.com/c/go/+/298950
@golang golang locked and limited conversation to collaborators Mar 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants