mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] cmd/compile: change export version to 1.17 for testing
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>
This commit is contained in:
parent
d7d4f28a06
commit
8ab59d812a
4 changed files with 19 additions and 18 deletions
|
|
@ -45,10 +45,10 @@ func (r *intReader) uint64() uint64 {
|
||||||
const (
|
const (
|
||||||
iexportVersionGo1_11 = 0
|
iexportVersionGo1_11 = 0
|
||||||
iexportVersionPosCol = 1
|
iexportVersionPosCol = 1
|
||||||
iexportVersionGenerics = 2
|
// TODO: before release, change this back to 2.
|
||||||
|
iexportVersionGenerics = iexportVersionPosCol
|
||||||
|
|
||||||
// Start of the unstable series of versions, remove "+ n" before release.
|
iexportVersionCurrent = iexportVersionGenerics
|
||||||
iexportVersionCurrent = iexportVersionGenerics + 1
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type ident struct {
|
type ident struct {
|
||||||
|
|
@ -99,7 +99,7 @@ func ImportData(imports map[string]*types2.Package, data, path string) (pkg *typ
|
||||||
|
|
||||||
version = int64(r.uint64())
|
version = int64(r.uint64())
|
||||||
switch version {
|
switch version {
|
||||||
case currentVersion, iexportVersionPosCol, iexportVersionGo1_11:
|
case /* iexportVersionGenerics, */ iexportVersionPosCol, iexportVersionGo1_11:
|
||||||
default:
|
default:
|
||||||
if version > iexportVersionGenerics {
|
if version > iexportVersionGenerics {
|
||||||
errorf("unstable iexport format version %d, just rebuild compiler and std library", version)
|
errorf("unstable iexport format version %d, just rebuild compiler and std library", version)
|
||||||
|
|
|
||||||
|
|
@ -228,10 +228,11 @@ import (
|
||||||
const (
|
const (
|
||||||
iexportVersionGo1_11 = 0
|
iexportVersionGo1_11 = 0
|
||||||
iexportVersionPosCol = 1
|
iexportVersionPosCol = 1
|
||||||
iexportVersionGenerics = 2
|
// 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
|
||||||
iexportVersionCurrent = iexportVersionGenerics + 1
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// predeclReserved is the number of type offsets reserved for types
|
// predeclReserved is the number of type offsets reserved for types
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ func ReadImports(pkg *types.Pkg, data string) {
|
||||||
|
|
||||||
version := ird.uint64()
|
version := ird.uint64()
|
||||||
switch version {
|
switch version {
|
||||||
case iexportVersionCurrent, iexportVersionPosCol, iexportVersionGo1_11:
|
case /* iexportVersionGenerics, */ iexportVersionPosCol, iexportVersionGo1_11:
|
||||||
default:
|
default:
|
||||||
if version > iexportVersionGenerics {
|
if version > iexportVersionGenerics {
|
||||||
base.Errorf("import %q: unstable export format version %d, just recompile", pkg.Path, version)
|
base.Errorf("import %q: unstable export format version %d, just recompile", pkg.Path, version)
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,10 @@ func (r *intReader) uint64() uint64 {
|
||||||
const (
|
const (
|
||||||
iexportVersionGo1_11 = 0
|
iexportVersionGo1_11 = 0
|
||||||
iexportVersionPosCol = 1
|
iexportVersionPosCol = 1
|
||||||
iexportVersionGenerics = 2
|
// TODO: before release, change this back to 2.
|
||||||
|
iexportVersionGenerics = iexportVersionPosCol
|
||||||
|
|
||||||
// Start of the unstable series of versions, remove "+ n" before release.
|
iexportVersionCurrent = iexportVersionGenerics
|
||||||
iexportVersionCurrent = iexportVersionGenerics + 1
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const predeclReserved = 32
|
const predeclReserved = 32
|
||||||
|
|
@ -91,7 +91,7 @@ func iImportData(fset *token.FileSet, imports map[string]*types.Package, dataRea
|
||||||
|
|
||||||
version = int64(r.uint64())
|
version = int64(r.uint64())
|
||||||
switch version {
|
switch version {
|
||||||
case currentVersion, iexportVersionPosCol, iexportVersionGo1_11:
|
case /* iexportVersionGenerics, */ iexportVersionPosCol, iexportVersionGo1_11:
|
||||||
default:
|
default:
|
||||||
if version > iexportVersionGenerics {
|
if version > iexportVersionGenerics {
|
||||||
errorf("unstable iexport format version %d, just rebuild compiler and std library", version)
|
errorf("unstable iexport format version %d, just rebuild compiler and std library", version)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue