go/gcimporter15: read v3 export data not containing type aliases

This is a short-term stop-gap to keep the builders happy.

Change-Id: I87171c20bf44f36fd2c4d7213211217de6110fdd
Reviewed-on: https://go-review.googlesource.com/32293
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Alan Donovan 2016-10-28 11:44:06 -04:00 committed by Alan Donovan
parent 0db92ca630
commit 6d7cee0134
1 changed files with 9 additions and 2 deletions

View File

@ -102,10 +102,17 @@ func BImportData(fset *token.FileSet, imports map[string]*types.Package, data []
// read version specific flags - extend as necessary
switch p.version {
// case 3:
// case 4:
// ...
// fallthrough
case 2, 1:
case 3, 2, 1:
// Support for Go 1.8 type aliases will be added very
// soon (Oct 2016). In the meantime, we make a
// best-effort attempt to read v3 export data, failing
// if we encounter a type alias. This allows the
// automated builders to make progress since
// type aliases are not yet used in practice.
// TODO(gri): add support for type aliases.
p.debugFormat = p.rawStringln(p.rawByte()) == "debug"
p.trackAllTypes = p.int() != 0
p.posInfoFormat = p.int() != 0