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: "downloading" message is misleading when GOPROXY points to a local directory #64853

Open
bsiegert opened this issue Dec 23, 2023 · 6 comments · May be fixed by #64957
Open

cmd/go: "downloading" message is misleading when GOPROXY points to a local directory #64853

bsiegert opened this issue Dec 23, 2023 · 6 comments · May be fixed by #64957
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bsiegert
Copy link
Contributor

Go version

go version go1.21.5 netbsd/amd64

What operating system and processor architecture are you using (go env)?

GO111MODULE=on
GOPATH=${WRKDIR}/.gopath
GOPROXY=file://${WRKDIR}/.goproxy
GOARCH="amd64"
GOHOSTOS="netbsd"
GOOS="netbsd"

What did you do?

When building packages in pkgsrc (as in other similar systems), there is a rule that there should be no downloads during the build. Instead, all downloads are in a separate phase, with checksumming.

During the build, we set GOPROXY to a file URL, as per above.

What did you expect to see?

Any accesses to the "proxy" (which, again, is a local directory) still show a message like

go: downloading golang.org/x/tools v0.14.1-0.20231114185516-c9d3e7de13fd

What did you see instead?

I would not expect a message saying "downloading" when using a file URL. Maybe "using" or "accessing" would be better in this case.

See http://mail-index.netbsd.org/tech-pkg/2023/12/23/msg028661.html for a thread where someone was genuinely confused, thinking the message means modules are being downloaded over the network.

@dr2chase
Copy link
Contributor

@bcmills

@dr2chase dr2chase added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 28, 2023
@bcmills
Copy link
Contributor

bcmills commented Jan 2, 2024

“copying” would probably be a better word in this case.

@bcmills bcmills added this to the Backlog milestone Jan 2, 2024
@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. help wanted and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 2, 2024
@Twacqwq Twacqwq linked a pull request Jan 4, 2024 that will close this issue
@gopherbot
Copy link

Change https://go.dev/cl/554035 mentions this issue: cmd/go: change file url goproxy misleading messages

@bcmills
Copy link
Contributor

bcmills commented Jan 4, 2024

Hmm. In general GOPROXY can be a list, which could mix file:// and https:// URLs in some arbitrary fallback order. Then there isn't one clear choice of verb.

@bsiegert, as an alternative, could you set GOMODCACHE to the pre-downloaded cache (instead of GOPROXY), and then run the build phase with GOPROXY=off?

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed help wanted labels Jan 4, 2024
@gopherbot gopherbot removed the NeedsFix The path to resolution is known, but the work has not been done. label Jan 4, 2024
@bsiegert
Copy link
Contributor Author

bsiegert commented Jan 6, 2024

We probably could but it's not a 1:1 replacement. The format of GOMODCACHE is pretty different.

@bcmills
Copy link
Contributor

bcmills commented Jan 9, 2024

Generally the GOPROXY data is a subset of the GOMODCACHE contents. (That is: a GOMODCACHE is a valid GOPROXY, but converting a GOPROXY corpus to a GOMODCACHE may require the go command to do a little unpacking.)

@seankhliao seankhliao removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants