From 52e95274200fabcac2b99138b37c22fec3ae0460 Mon Sep 17 00:00:00 2001 From: Robert Findley Date: Mon, 10 Jan 2022 18:46:59 -0500 Subject: [PATCH] go/internal/gcimporter: set iexportVersionGenerics to 2 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 Run-TryBot: Robert Findley gopls-CI: kokoro TryBot-Result: Gopher Robot Reviewed-by: Dan Scales Trust: Dan Scales --- go/internal/gcimporter/iimport.go | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/go/internal/gcimporter/iimport.go b/go/internal/gcimporter/iimport.go index cdb332cd15..475b04de41 100644 --- a/go/internal/gcimporter/iimport.go +++ b/go/internal/gcimporter/iimport.go @@ -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 {