]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modfetch: do not use mangled version strings to construct module...
authorBryan C. Mills <bcmills@google.com>
Thu, 27 Aug 2020 03:17:53 +0000 (23:17 -0400)
committerBryan C. Mills <bcmills@google.com>
Thu, 27 Aug 2020 18:28:53 +0000 (18:28 +0000)
commitc00b7081699d3b3ced2970fdae2de6febf638c05
treeb5a519d71517d7f53bdd1998574d91248c34d176
parent3b20d484fbb7a4f64881002f8a63eca42f0e7c29
cmd/go/internal/modfetch: do not use mangled version strings to construct module.VersionErrors

Better still would be to avoid passing around module.Version instances
with invalid Version strings in the first place, so that any time we
see a module.Version we know that it is actually a version of a module
(and not a structurally-similar datum with something else tacked on to
one of the fields). But that's a bigger cleanup for which I don't
currently have enough bandwidth.

Fixes #41060

Change-Id: I32fba5619105cbf67dd03691064c82b8ebb3ce18
Reviewed-on: https://go-review.googlesource.com/c/go/+/250951
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/modfetch/fetch.go
src/cmd/go/testdata/script/mod_download_json.txt
src/cmd/go/testdata/script/mod_sumdb.txt