From c959b77b386df1ec8bf3a488b0915aece12b9c41 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 10 Nov 2016 16:03:20 -0800 Subject: [PATCH] go/gcimporter15: update build tags and comments We don't support Go1.5 anymore. Tested with 1.6, 1.7, and tip. For golang/go#17734. Change-Id: I718c7996b99f9b98744346e119ee209b4709a070 Reviewed-on: https://go-review.googlesource.com/33111 Reviewed-by: Alan Donovan --- go/gcimporter15/bexport.go | 2 -- go/gcimporter15/bexport_test.go | 2 -- go/gcimporter15/bimport.go | 6 ++---- go/gcimporter15/exportdata.go | 4 +--- go/gcimporter15/gcimporter.go | 12 +++--------- go/gcimporter15/gcimporter_test.go | 6 ++---- 6 files changed, 8 insertions(+), 24 deletions(-) diff --git a/go/gcimporter15/bexport.go b/go/gcimporter15/bexport.go index c414c7a7..539c7a42 100644 --- a/go/gcimporter15/bexport.go +++ b/go/gcimporter15/bexport.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.6 - // Binary package export. // This file was derived from $GOROOT/src/cmd/compile/internal/gc/bexport.go; // see that file for specification of the format. diff --git a/go/gcimporter15/bexport_test.go b/go/gcimporter15/bexport_test.go index bc72bf64..6ab3bcb1 100644 --- a/go/gcimporter15/bexport_test.go +++ b/go/gcimporter15/bexport_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.6 - package gcimporter_test import ( diff --git a/go/gcimporter15/bimport.go b/go/gcimporter15/bimport.go index b3fe9617..e0ca8c9e 100644 --- a/go/gcimporter15/bimport.go +++ b/go/gcimporter15/bimport.go @@ -2,9 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.6 - -// This file is a copy of $GOROOT/src/go/internal/gcimporter/bimport.go, tagged for go1.6. +// This file is a copy of $GOROOT/src/go/internal/gcimporter/bimport.go. package gcimporter @@ -292,7 +290,7 @@ func (p *importer) obj(tag int) { _ = pos _ = name _ = orig - // p.declare(types_NewAlias(pos, p.pkgList[0], name, orig)) + // p.declare(types.NewAlias(pos, p.pkgList[0], name, orig)) default: errorf("unexpected object tag %d", tag) diff --git a/go/gcimporter15/exportdata.go b/go/gcimporter15/exportdata.go index b4b89d65..f33dc561 100644 --- a/go/gcimporter15/exportdata.go +++ b/go/gcimporter15/exportdata.go @@ -2,9 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.6 - -// This file is a copy of $GOROOT/src/go/internal/gcimporter/exportdata.go, tagged for go1.6. +// This file is a copy of $GOROOT/src/go/internal/gcimporter/exportdata.go. // This file implements FindExportData. diff --git a/go/gcimporter15/gcimporter.go b/go/gcimporter15/gcimporter.go index a0f9dfdf..48a4ef29 100644 --- a/go/gcimporter15/gcimporter.go +++ b/go/gcimporter15/gcimporter.go @@ -2,20 +2,14 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.6 - -// This file is a copy of $GOROOT/src/go/internal/gcimporter/gcimporter.go, tagged for go1.6, -// and minimally adjusted to make it build. +// This file is a copy of $GOROOT/src/go/internal/gcimporter/gcimporter.go, +// but it also contains the original source-based importer code for Go1.6. +// Once we stop supporting 1.6, we can remove that code. // Package gcimporter15 provides various functions for reading // gc-generated object files that can be used to implement the // Importer interface defined by the Go 1.5 standard library package. // -// This package serves as a stop-gap for missing features in the -// standard library's go/importer package, specifically customizable -// package data lookup. This package should be deleted once that -// functionality becomes available in the standard library. -// // Deprecated: this package will be deleted in October 2017. // New code should use golang.org/x/tools/go/gcexportdata. // diff --git a/go/gcimporter15/gcimporter_test.go b/go/gcimporter15/gcimporter_test.go index e4e481db..3e23c560 100644 --- a/go/gcimporter15/gcimporter_test.go +++ b/go/gcimporter15/gcimporter_test.go @@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.6 - -// This file is a copy of $GOROOT/src/go/internal/gcimporter/gcimporter_test.go, tagged for go1.6, -// and minimally adjusted to make it build with code from (std lib) internal/testenv copied. +// This file is a copy of $GOROOT/src/go/internal/gcimporter/gcimporter_test.go, +// adjusted to make it build with code from (std lib) internal/testenv copied. package gcimporter