]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.typeparams] cmd/compile: change export version to 1.17 for testing
authorDan Scales <danscales@google.com>
Tue, 10 Aug 2021 19:49:21 +0000 (12:49 -0700)
committerDan Scales <danscales@google.com>
Wed, 11 Aug 2021 19:48:50 +0000 (19:48 +0000)
This is a temporary change. We will revert this back before the 1.18
release. We make this change now to simplify testing, since a lot of
tools will break on the new export version.

Updates #47654.

Change-Id: I0650fa753bb11229c71254d779dd61b5c1af9cdf
Reviewed-on: https://go-review.googlesource.com/c/go/+/341211
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/importer/iimport.go
src/cmd/compile/internal/typecheck/iexport.go
src/cmd/compile/internal/typecheck/iimport.go
src/go/internal/gcimporter/iimport.go

index 6051cdaf2318c691c070b1f1eb3afccce3e44fc6..a317dfc34ad634464328680c0b9fbbedc0df3902 100644 (file)
@@ -43,12 +43,12 @@ func (r *intReader) uint64() uint64 {
 
 // Keep this in sync with constants in iexport.go.
 const (
-       iexportVersionGo1_11   = 0
-       iexportVersionPosCol   = 1
-       iexportVersionGenerics = 2
+       iexportVersionGo1_11 = 0
+       iexportVersionPosCol = 1
+       // TODO: before release, change this back to 2.
+       iexportVersionGenerics = iexportVersionPosCol
 
-       // Start of the unstable series of versions, remove "+ n" before release.
-       iexportVersionCurrent = iexportVersionGenerics + 1
+       iexportVersionCurrent = iexportVersionGenerics
 )
 
 type ident struct {
@@ -99,7 +99,7 @@ func ImportData(imports map[string]*types2.Package, data, path string) (pkg *typ
 
        version = int64(r.uint64())
        switch version {
-       case currentVersion, iexportVersionPosCol, iexportVersionGo1_11:
+       case /* iexportVersionGenerics, */ iexportVersionPosCol, iexportVersionGo1_11:
        default:
                if version > iexportVersionGenerics {
                        errorf("unstable iexport format version %d, just rebuild compiler and std library", version)
index 5f510a0a250cd1e659d443f1ed766871e9e78e94..75b4931c310b272096e4a18cf5f87b88d55eee42 100644 (file)
@@ -226,12 +226,13 @@ import (
 // 1: added column details to Pos
 // 2: added information for generic function/types (currently unstable)
 const (
-       iexportVersionGo1_11   = 0
-       iexportVersionPosCol   = 1
-       iexportVersionGenerics = 2
+       iexportVersionGo1_11 = 0
+       iexportVersionPosCol = 1
+       // TODO: before release, change this back to 2.  Kept at previous version
+       // for now (for testing).
+       iexportVersionGenerics = iexportVersionPosCol
 
-       // Start of the unstable series of versions, remove "+ n" before release.
-       iexportVersionCurrent = iexportVersionGenerics + 1
+       iexportVersionCurrent = iexportVersionGenerics
 )
 
 // predeclReserved is the number of type offsets reserved for types
index 83974b6d5678feff3282d3df76377c50e4b43384..2e3fdbc1bc99b365bc8524a1742f95a23ae75f04 100644 (file)
@@ -119,7 +119,7 @@ func ReadImports(pkg *types.Pkg, data string) {
 
        version := ird.uint64()
        switch version {
-       case iexportVersionCurrent, iexportVersionPosCol, iexportVersionGo1_11:
+       case /* iexportVersionGenerics, */ iexportVersionPosCol, iexportVersionGo1_11:
        default:
                if version > iexportVersionGenerics {
                        base.Errorf("import %q: unstable export format version %d, just recompile", pkg.Path, version)
index d4778d3a745fdf5ecda6db0e3b3f09c247f74682..dbc9b3a83e8ddeccec4a6c4687779536293b4a15 100644 (file)
@@ -43,12 +43,12 @@ func (r *intReader) uint64() uint64 {
 
 // Keep this in sync with constants in iexport.go.
 const (
-       iexportVersionGo1_11   = 0
-       iexportVersionPosCol   = 1
-       iexportVersionGenerics = 2
+       iexportVersionGo1_11 = 0
+       iexportVersionPosCol = 1
+       // TODO: before release, change this back to 2.
+       iexportVersionGenerics = iexportVersionPosCol
 
-       // Start of the unstable series of versions, remove "+ n" before release.
-       iexportVersionCurrent = iexportVersionGenerics + 1
+       iexportVersionCurrent = iexportVersionGenerics
 )
 
 const predeclReserved = 32
@@ -91,7 +91,7 @@ func iImportData(fset *token.FileSet, imports map[string]*types.Package, dataRea
 
        version = int64(r.uint64())
        switch version {
-       case currentVersion, iexportVersionPosCol, iexportVersionGo1_11:
+       case /* iexportVersionGenerics, */ iexportVersionPosCol, iexportVersionGo1_11:
        default:
                if version > iexportVersionGenerics {
                        errorf("unstable iexport format version %d, just rebuild compiler and std library", version)