tools/go
Dmitri Shuralyov 2d16b83fe9 go/vcs: ignore "mod" VCS type
golang.org/x/tools/go/vcs is significantly behind the upstream
cmd/go/internal/get code, and has no support for modules. It continues
to implement mechanics for GOPATH mode only.

This change is a minimal fix to get it to continue to work
in the presence of the module mode-only "mod" VCS type
(documented at https://golang.org/cmd/go/#hdr-Remote_import_paths)
by effectively implementing IgnoreMod ModuleMode behavior.

It is similar to issue golang/go#24751 and a small subset of CL 109340
that fixed it.

This helps with module adoption by reducing the harm of adding the
"mod" VCS type for vanity import paths, something that was meant to
be backwards compatible.

While here, also backport CL 14482 (the Token to RawToken change).

Fixes golang/go#31845
Updates golang/go#24751

Change-Id: I0852f52cb9bda56879f923337c7f361df8412845
Reviewed-on: https://go-review.googlesource.com/c/tools/+/175219
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-05-06 14:53:03 +00:00
..
analysis go/analysis: proposed fact enumeration API 2019-05-03 03:01:57 +00:00
ast go/ast/inspector: fix a small typo 2019-01-10 14:16:07 +00:00
buildutil go/buildutil: get tests to pass when run from a module 2019-02-14 18:55:18 +00:00
callgraph go/...: use recommended issue tracker URLs 2018-12-05 01:41:16 +00:00
cfg go/cfg: a syntactic control-flow graph (CFG) 2018-09-26 00:57:46 +00:00
expect go/expect: rewrite the expectation parser 2018-11-30 19:57:46 +00:00
gccgoexportdata go/gccgoexportdata: correctly handle archive files containing string tables 2016-11-09 21:28:38 +00:00
gcexportdata go/gcexportdata: fix example test for changes in net/rpc 2019-04-16 18:06:57 +00:00
internal go/internal/gccgoimporter: update package to match std lib version 2019-04-25 00:10:55 +00:00
loader go/...: use recommended issue tracker URLs 2018-12-05 01:41:16 +00:00
packages go/packages/packagestest: fix GOPROXY file URLs for Windows 2019-04-25 21:41:24 +00:00
pointer go/...: use recommended issue tracker URLs 2018-12-05 01:41:16 +00:00
ssa go/ssa/interp: make tests fast and robust 2019-03-22 17:29:27 +00:00
types go/analysis/passes/printf: changes for analysis API 2018-10-16 19:44:49 +00:00
vcs go/vcs: ignore "mod" VCS type 2019-05-06 14:53:03 +00:00