Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

cmd/go: module downloads contain vendor/modules.txt #63395

Closed
rsc opened this issue Oct 5, 2023 · 3 comments
Closed

cmd/go: module downloads contain vendor/modules.txt #63395

rsc opened this issue Oct 5, 2023 · 3 comments
Assignees
Labels
GoCommand cmd/go modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Oct 5, 2023

go mod download -json github.com/go-delve/delve@latest
shows a Dir that contains vendor/modules.txt.
None of the other vendor files are present, just modules.txt.

This is probably a bug: we intended for modules to contain
no vendored info at all, but we had to leave files in the root
alone because they might be for a package or command
named vendor (only subdirectories are trimmed).

We should probably update the logic to trim modules.txt
as well, but only when the go.mod has a new enough Go version.

/cc @bcmills

@rsc rsc added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 5, 2023
@rsc rsc added this to the Go1.22 milestone Oct 5, 2023
@dmitshur dmitshur added the GoCommand cmd/go label Oct 6, 2023
@bcmills
Copy link
Contributor

bcmills commented Oct 11, 2023

I think this is another symptom of the known bug described in #31562.

I agree that this is something we can probably fix now that Go 1.21 and above refuse to produce module zips for Go versions that are too new.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/584635 mentions this issue: x/mod: remove vendor/modules.txt from module download

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/605796 mentions this issue: go.mod: update required go version to go1.22

gopherbot pushed a commit to golang/mod that referenced this issue Aug 15, 2024
Now that go1.23 has been released, versions of Go older than go1.22 are
no longer supported.

This will allow us to use the go/version package, which was introduced
in Go 1.22.

This change will force modules that depend on golang.org/x/mod, notably
golang.org/x/tools, to update their Go version requirement to at least
go1.22 when they update their requirement on golang.org/x/mod to a
version after this commit.

For golang/go#63395

Change-Id: I6f6b5bb9e43b5f9945cc5bc8c398628436d2e739
Reviewed-on: https://go-review.googlesource.com/c/mod/+/605796
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
GoCommand cmd/go modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants