Skip to content

Commit

Permalink
go/internal/gcimporter: set iexportVersionGenerics to 2
Browse files Browse the repository at this point in the history
Now that the standard library importer/exporter has been updated for a
while, we can set iexportVersionGenerics to its final value -- 2.

Fixes golang/go#47654

Change-Id: I27eca4cf2b82b7c09e2b6a754c6e5e5af71a7b29
Reviewed-on: https://go-review.googlesource.com/c/tools/+/377554
Trust: Robert Findley <[email protected]>
Run-TryBot: Robert Findley <[email protected]>
gopls-CI: kokoro <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Dan Scales <[email protected]>
Trust: Dan Scales <[email protected]>
  • Loading branch information
findleyr committed Jan 11, 2022
1 parent f234b3d commit 52e9527
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions go/internal/gcimporter/iimport.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,11 @@ func (r *intReader) uint64() uint64 {
}

// Keep this in sync with constants in iexport.go.
//
// Temporarily, the x/tools importer accepts generic code at both version 1 and
// 2. However, version 2 contains some breaking changes on top of version 1:
// - the 'implicit' bit is added to exported constraints
// - a 'kind' byte is added to constant values (not yet done)
//
// Once we've completed the bump to version 2 in the standard library, we'll
// remove support for generics here at version 1.
const (
iexportVersionGo1_11 = 0
iexportVersionPosCol = 1
iexportVersionGo1_18 = 2
// TODO: before release, change this back to 2.
iexportVersionGenerics = iexportVersionPosCol
iexportVersionGo1_11 = 0
iexportVersionPosCol = 1
iexportVersionGo1_18 = 2
iexportVersionGenerics = 2
)

type ident struct {
Expand Down

0 comments on commit 52e9527

Please sign in to comment.