go/internal/gcimporter: bump version number in skew check

This constant controls the "version skew" warning printed
in case of panic, but doesn't control the version that is
actually accepted, which is currently v2.

Also, clarify meaning of 'path' parameter. The subtle
difference between "package path" (linker symbol prefix,
which may have "vendor/" prefix) and "import path" (string
literal appearing in import declaration, sans "vendor/")
is a pervasive source of bugs in gopls' handling of vendored
packages.

Change-Id: I8c3001a23b84abb1f18d861e01334bb3f0a5c27a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/444537
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Alan Donovan <adonovan@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/go/gcexportdata/gcexportdata.go b/go/gcexportdata/gcexportdata.go
index 2ed25a7..42adb8f 100644
--- a/go/gcexportdata/gcexportdata.go
+++ b/go/gcexportdata/gcexportdata.go
@@ -87,7 +87,11 @@
 
 // Read reads export data from in, decodes it, and returns type
 // information for the package.
-// The package name is specified by path.
+//
+// The package path (effectively its linker symbol prefix) is
+// specified by path, since unlike the package name, this information
+// may not be recorded in the export data.
+//
 // File position information is added to fset.
 //
 // Read may inspect and add to the imports map to ensure that references
diff --git a/go/internal/gcimporter/iimport.go b/go/internal/gcimporter/iimport.go
index 4caa0f5..6e4c066 100644
--- a/go/internal/gcimporter/iimport.go
+++ b/go/internal/gcimporter/iimport.go
@@ -51,6 +51,8 @@
 	iexportVersionPosCol   = 1
 	iexportVersionGo1_18   = 2
 	iexportVersionGenerics = 2
+
+	iexportVersionCurrent = 2
 )
 
 type ident struct {
@@ -96,7 +98,7 @@
 }
 
 func iimportCommon(fset *token.FileSet, imports map[string]*types.Package, data []byte, bundle bool, path string) (pkgs []*types.Package, err error) {
-	const currentVersion = 1
+	const currentVersion = iexportVersionCurrent
 	version := int64(-1)
 	if !debug {
 		defer func() {