From 6d7cee0134e889eb7e1f17662ea1881d5a6ffb42 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Fri, 28 Oct 2016 11:44:06 -0400 Subject: [PATCH] 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 --- go/gcimporter15/bimport.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/go/gcimporter15/bimport.go b/go/gcimporter15/bimport.go index 131d999e..a17fdf0a 100644 --- a/go/gcimporter15/bimport.go +++ b/go/gcimporter15/bimport.go @@ -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