Open Stebalien opened 5 years ago
It looks like go mod download -json
returns all the modules with code needed to build the current package. However, go needs some metadata from all modules mentioned in go mod graph
.
Options as I see them:
go build
and friends to work when this metadata is unavailable. Given that go doesn't appear to need the code, this should be possible as far as I can tell.go mod download -json
. That is, return Module
structs with the Zip
field omitted.go mod download -json
.go build
isn't trying to fetch anything extra based on the contents of go.sum
, but it is trying to fetch go.mod
files for all of the module versions that appear in the requirements of any module in the module graph.
Probably we should download those go.mod
files in go mod download
and include them in the -json
output.
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?
go mod download -json
./list
files as needed).What did you expect to see?
go build
,go mod download
should work without fetching anything.What did you see instead?
go build
andgo mod download
is getting 404 errors due to files missing from the bundle. It looks likego build
is trying to fetch:go.sum
files that aren't actually needed for the build (as far as I can tell, at least).I'd expect
go mod download -json
to return a list of every downloaded package.Context: I'm trying to integrate
go mod
with IPFS.Testing against: https://github.com/anacrolix/torrent/tree/ipgo