1
0
mirror of https://github.com/golang/go synced 2024-10-03 04:21:22 -06:00

go/types: move go/types/internal/gcimport => go/internal/gcimporter

This will make it possible to access the gcimporter (and gccgoimporter,
eventually) from the forthcoming gc/importer package, without exposing
compiler names in package names.

This change was created by manually adjusting the gcimporter paths in
go/types.bash and then running sh go/types.bash (i.e., by revendoring
gcimporter). The only manual changes are in go/types.bash.

Change-Id: Idc282439742288c09caa58b3a66d77aec0325faf
Reviewed-on: https://go-review.googlesource.com/8764
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
This commit is contained in:
Robert Griesemer 2015-04-10 16:45:10 -07:00
parent 2539ccb8db
commit 92eb9aea47
16 changed files with 16 additions and 16 deletions

View File

@ -4,7 +4,7 @@
// Package gcimporter implements Import for gc-generated object files.
// Importing this package installs Import as go/types.DefaultImport.
package gcimporter // import "go/types/internal/gcimporter"
package gcimporter // import "go/internal/gcimporter"
import (
"bufio"

View File

@ -40,7 +40,7 @@ function vendor() (
# copy $f and update imports
sed -e 's|"golang.org/x/tools/go/exact"|"go/exact"|' \
-e 's|"golang.org/x/tools/go/types"|"go/types"|' \
-e 's|"golang.org/x/tools/go/gcimporter"|"go/types/internal/gcimporter"|' \
-e 's|"golang.org/x/tools/go/gcimporter"|"go/internal/gcimporter"|' \
$f | gofmt > tmp.go
mv -f tmp.go `basename $f`
done
@ -81,9 +81,9 @@ vendor go/types types
install types
### go/gcimporter
vendor go/gcimporter types/internal/gcimporter
test types/internal/gcimporter
install types/internal/gcimporter
vendor go/gcimporter internal/gcimporter
test internal/gcimporter
install internal/gcimporter
### test go/types (requires gcimporter)
test types

View File

@ -122,7 +122,7 @@ type Config struct {
// DefaultImport is the default importer invoked if Config.Import == nil.
// The declaration:
//
// import _ "go/types/internal/gcimporter"
// import _ "go/internal/gcimporter"
//
// in a client of go/types will initialize DefaultImport to gcimporter.Import.
var DefaultImport Importer

View File

@ -14,8 +14,8 @@ import (
"strings"
"testing"
_ "go/internal/gcimporter"
. "go/types"
_ "go/types/internal/gcimporter"
)
// skipSpecialPlatforms causes the test to be skipped for platforms where

View File

@ -10,8 +10,8 @@ import (
"go/parser"
"testing"
_ "go/internal/gcimporter"
. "go/types"
_ "go/types/internal/gcimporter"
)
var builtinCalls = []struct {

View File

@ -36,8 +36,8 @@ import (
"strings"
"testing"
_ "go/internal/gcimporter"
. "go/types"
_ "go/types/internal/gcimporter"
)
var (

View File

@ -13,8 +13,8 @@ import (
"strings"
"testing"
_ "go/internal/gcimporter"
. "go/types"
_ "go/types/internal/gcimporter"
)
func testEval(t *testing.T, pkg *Package, scope *Scope, str string, typ Type, typStr, valStr string) {

View File

@ -14,8 +14,8 @@ import (
"strings"
"testing"
_ "go/internal/gcimporter"
. "go/types"
_ "go/types/internal/gcimporter"
)
func TestIssue5770(t *testing.T) {

View File

@ -135,7 +135,7 @@ func (check *Checker) collectObjects() {
} else {
// Panic if we encounter an import.
importer = func(map[string]*Package, string) (*Package, error) {
panic(`no Config.Import or DefaultImport (missing import _ "go/types/internal/gcimporter"?)`)
panic(`no Config.Import or DefaultImport (missing import _ "go/internal/gcimporter"?)`)
}
}
}

View File

@ -12,8 +12,8 @@ import (
"sort"
"testing"
_ "go/internal/gcimporter"
. "go/types"
_ "go/types/internal/gcimporter"
)
var sources = []string{

View File

@ -14,8 +14,8 @@ import (
"testing"
"time"
_ "go/internal/gcimporter"
. "go/types"
_ "go/types/internal/gcimporter"
)
var benchmark = flag.Bool("b", false, "run benchmarks")

View File

@ -22,8 +22,8 @@ import (
"testing"
"time"
_ "go/internal/gcimporter"
. "go/types"
_ "go/types/internal/gcimporter"
)
var (

View File

@ -10,8 +10,8 @@ import (
"go/token"
"testing"
_ "go/internal/gcimporter"
. "go/types"
_ "go/types/internal/gcimporter"
)
const filename = "<src>"