]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modconv: use modules to examine instead of using only direct source...
authorAofei Sheng <aofei@aofeisheng.com>
Wed, 21 Aug 2019 21:23:41 +0000 (05:23 +0800)
committerBryan C. Mills <bcmills@google.com>
Wed, 11 Sep 2019 19:02:10 +0000 (19:02 +0000)
commit04867cd89121d9738fb16e8f299a9263a91282eb
tree3ddf89847256ac47ea7210d4016797764b42bffc
parentcc39d8087b20fce14e60b7e5f287593da2c72749
cmd/go/internal/modconv: use modules to examine instead of using only direct source control entries

Since modules now support parsing multiple forms of versions (including
commit hash and source control tag), I think modconv.ConvertLegacyConfig
no longer needs modfetch.ImportRepoRev. So I suggest that we use modules
to convert legacy config instead of using VCS directly. By doing this,
we can make the module proxy participate in the conversion process and
benefit from it (such as speeding up "go mod init" or breaking through
the firewall).

And since modconv.ConvertLegacyConfig is the only caller of
modfetch.ImportRepoRev, I think modfetch.ImportRepoRev can be removed.

Fixes #33767

Change-Id: Ic79b14fa805ed297ca1735a8498cfed2a5ddeec2
Reviewed-on: https://go-review.googlesource.com/c/go/+/191218
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/modconv/convert.go
src/cmd/go/internal/modfetch/repo.go
src/cmd/go/testdata/script/mod_init_dep.txt