]> Cypherpunks.ru repositories - gostls13.git/commitdiff
all: rename vendored golang.org/x/net packages to golang_org
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 13 Jul 2016 16:49:48 +0000 (10:49 -0600)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 13 Jul 2016 18:35:40 +0000 (18:35 +0000)
Regression from Go 1.6 to Go 1.7rc1: we had broken the ability for
users to vendor "golang.org/x/net/http2" or "golang.org/x/net/route"
because we were vendoring them ourselves and cmd/go and cmd/compile do
not understand multiple vendor directories across multiple GOPATH
workspaces (e.g. user's $GOPATH and default $GOROOT).

As a short-term fix, since fixing cmd/go and cmd/compile is too
invasive at this point in the cycle, just rename "golang.org" to
"golang_org" for the standard library's vendored copy.

Fixes #16333

Change-Id: I9bfaed91e9f7d4ca6bab07befe80d71d437a21af
Reviewed-on: https://go-review.googlesource.com/24902
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
58 files changed:
src/cmd/api/goapi.go
src/go/build/build_test.go
src/go/build/deps_test.go
src/net/http/h2_bundle.go
src/net/http/http.go
src/net/http/server.go
src/net/http/transfer.go
src/net/http/transport.go
src/net/interface_bsd.go
src/net/interface_bsdvar.go
src/net/interface_darwin.go
src/net/interface_freebsd.go
src/vendor/golang_org/x/net/http2/hpack/encode.go [moved from src/vendor/golang.org/x/net/http2/hpack/encode.go with 100% similarity]
src/vendor/golang_org/x/net/http2/hpack/encode_test.go [moved from src/vendor/golang.org/x/net/http2/hpack/encode_test.go with 100% similarity]
src/vendor/golang_org/x/net/http2/hpack/hpack.go [moved from src/vendor/golang.org/x/net/http2/hpack/hpack.go with 100% similarity]
src/vendor/golang_org/x/net/http2/hpack/hpack_test.go [moved from src/vendor/golang.org/x/net/http2/hpack/hpack_test.go with 100% similarity]
src/vendor/golang_org/x/net/http2/hpack/huffman.go [moved from src/vendor/golang.org/x/net/http2/hpack/huffman.go with 100% similarity]
src/vendor/golang_org/x/net/http2/hpack/tables.go [moved from src/vendor/golang.org/x/net/http2/hpack/tables.go with 100% similarity]
src/vendor/golang_org/x/net/lex/httplex/httplex.go [moved from src/vendor/golang.org/x/net/lex/httplex/httplex.go with 100% similarity]
src/vendor/golang_org/x/net/lex/httplex/httplex_test.go [moved from src/vendor/golang.org/x/net/lex/httplex/httplex_test.go with 100% similarity]
src/vendor/golang_org/x/net/route/address.go [moved from src/vendor/golang.org/x/net/route/address.go with 100% similarity]
src/vendor/golang_org/x/net/route/address_darwin_test.go [moved from src/vendor/golang.org/x/net/route/address_darwin_test.go with 100% similarity]
src/vendor/golang_org/x/net/route/address_test.go [moved from src/vendor/golang.org/x/net/route/address_test.go with 100% similarity]
src/vendor/golang_org/x/net/route/binary.go [moved from src/vendor/golang.org/x/net/route/binary.go with 100% similarity]
src/vendor/golang_org/x/net/route/defs_darwin.go [moved from src/vendor/golang.org/x/net/route/defs_darwin.go with 100% similarity]
src/vendor/golang_org/x/net/route/defs_dragonfly.go [moved from src/vendor/golang.org/x/net/route/defs_dragonfly.go with 100% similarity]
src/vendor/golang_org/x/net/route/defs_freebsd.go [moved from src/vendor/golang.org/x/net/route/defs_freebsd.go with 100% similarity]
src/vendor/golang_org/x/net/route/defs_netbsd.go [moved from src/vendor/golang.org/x/net/route/defs_netbsd.go with 100% similarity]
src/vendor/golang_org/x/net/route/defs_openbsd.go [moved from src/vendor/golang.org/x/net/route/defs_openbsd.go with 100% similarity]
src/vendor/golang_org/x/net/route/interface.go [moved from src/vendor/golang.org/x/net/route/interface.go with 100% similarity]
src/vendor/golang_org/x/net/route/interface_announce.go [moved from src/vendor/golang.org/x/net/route/interface_announce.go with 100% similarity]
src/vendor/golang_org/x/net/route/interface_classic.go [moved from src/vendor/golang.org/x/net/route/interface_classic.go with 100% similarity]
src/vendor/golang_org/x/net/route/interface_freebsd.go [moved from src/vendor/golang.org/x/net/route/interface_freebsd.go with 100% similarity]
src/vendor/golang_org/x/net/route/interface_multicast.go [moved from src/vendor/golang.org/x/net/route/interface_multicast.go with 100% similarity]
src/vendor/golang_org/x/net/route/interface_openbsd.go [moved from src/vendor/golang.org/x/net/route/interface_openbsd.go with 100% similarity]
src/vendor/golang_org/x/net/route/message.go [moved from src/vendor/golang.org/x/net/route/message.go with 100% similarity]
src/vendor/golang_org/x/net/route/message_darwin_test.go [moved from src/vendor/golang.org/x/net/route/message_darwin_test.go with 100% similarity]
src/vendor/golang_org/x/net/route/message_freebsd_test.go [moved from src/vendor/golang.org/x/net/route/message_freebsd_test.go with 100% similarity]
src/vendor/golang_org/x/net/route/message_test.go [moved from src/vendor/golang.org/x/net/route/message_test.go with 100% similarity]
src/vendor/golang_org/x/net/route/route.go [moved from src/vendor/golang.org/x/net/route/route.go with 100% similarity]
src/vendor/golang_org/x/net/route/route_classic.go [moved from src/vendor/golang.org/x/net/route/route_classic.go with 100% similarity]
src/vendor/golang_org/x/net/route/route_openbsd.go [moved from src/vendor/golang.org/x/net/route/route_openbsd.go with 100% similarity]
src/vendor/golang_org/x/net/route/route_test.go [moved from src/vendor/golang.org/x/net/route/route_test.go with 100% similarity]
src/vendor/golang_org/x/net/route/sys.go [moved from src/vendor/golang.org/x/net/route/sys.go with 100% similarity]
src/vendor/golang_org/x/net/route/sys_darwin.go [moved from src/vendor/golang.org/x/net/route/sys_darwin.go with 100% similarity]
src/vendor/golang_org/x/net/route/sys_dragonfly.go [moved from src/vendor/golang.org/x/net/route/sys_dragonfly.go with 100% similarity]
src/vendor/golang_org/x/net/route/sys_freebsd.go [moved from src/vendor/golang.org/x/net/route/sys_freebsd.go with 100% similarity]
src/vendor/golang_org/x/net/route/sys_netbsd.go [moved from src/vendor/golang.org/x/net/route/sys_netbsd.go with 100% similarity]
src/vendor/golang_org/x/net/route/sys_openbsd.go [moved from src/vendor/golang.org/x/net/route/sys_openbsd.go with 100% similarity]
src/vendor/golang_org/x/net/route/syscall.go [moved from src/vendor/golang.org/x/net/route/syscall.go with 100% similarity]
src/vendor/golang_org/x/net/route/syscall.s [moved from src/vendor/golang.org/x/net/route/syscall.s with 100% similarity]
src/vendor/golang_org/x/net/route/zsys_darwin.go [moved from src/vendor/golang.org/x/net/route/zsys_darwin.go with 100% similarity]
src/vendor/golang_org/x/net/route/zsys_dragonfly.go [moved from src/vendor/golang.org/x/net/route/zsys_dragonfly.go with 100% similarity]
src/vendor/golang_org/x/net/route/zsys_freebsd_386.go [moved from src/vendor/golang.org/x/net/route/zsys_freebsd_386.go with 100% similarity]
src/vendor/golang_org/x/net/route/zsys_freebsd_amd64.go [moved from src/vendor/golang.org/x/net/route/zsys_freebsd_amd64.go with 100% similarity]
src/vendor/golang_org/x/net/route/zsys_freebsd_arm.go [moved from src/vendor/golang.org/x/net/route/zsys_freebsd_arm.go with 100% similarity]
src/vendor/golang_org/x/net/route/zsys_netbsd.go [moved from src/vendor/golang.org/x/net/route/zsys_netbsd.go with 100% similarity]
src/vendor/golang_org/x/net/route/zsys_openbsd.go [moved from src/vendor/golang.org/x/net/route/zsys_openbsd.go with 100% similarity]

index e9c91477c627752e392ce9c13392250da62044c8..936f9e55115fe6da6967c87a16c0f5152cd5e9ce 100644 (file)
@@ -425,7 +425,7 @@ func (w *Walker) Import(name string) (*types.Package, error) {
        w.imported[name] = &importing
 
        root := w.root
-       if strings.HasPrefix(name, "golang.org/x/") {
+       if strings.HasPrefix(name, "golang_org/x/") {
                root = filepath.Join(root, "vendor")
        }
 
index c9f906a7da6d0a5b498ac771c03cdd4ea07d51d1..198a649b15041771c67a4b6ca945f18f91e8e227 100644 (file)
@@ -303,11 +303,11 @@ func TestImportVendor(t *testing.T) {
        testenv.MustHaveGoBuild(t) // really must just have source
        ctxt := Default
        ctxt.GOPATH = ""
-       p, err := ctxt.Import("golang.org/x/net/http2/hpack", filepath.Join(ctxt.GOROOT, "src/net/http"), 0)
+       p, err := ctxt.Import("golang_org/x/net/http2/hpack", filepath.Join(ctxt.GOROOT, "src/net/http"), 0)
        if err != nil {
-               t.Fatalf("cannot find vendored golang.org/x/net/http2/hpack from net/http directory: %v", err)
+               t.Fatalf("cannot find vendored golang_org/x/net/http2/hpack from net/http directory: %v", err)
        }
-       want := "vendor/golang.org/x/net/http2/hpack"
+       want := "vendor/golang_org/x/net/http2/hpack"
        if p.ImportPath != want {
                t.Fatalf("Import succeeded but found %q, want %q", p.ImportPath, want)
        }
@@ -333,7 +333,7 @@ func TestImportVendorParentFailure(t *testing.T) {
        ctxt := Default
        ctxt.GOPATH = ""
        // This import should fail because the vendor/golang.org/x/net/http2 directory has no source code.
-       p, err := ctxt.Import("golang.org/x/net/http2", filepath.Join(ctxt.GOROOT, "src/net/http"), 0)
+       p, err := ctxt.Import("golang_org/x/net/http2", filepath.Join(ctxt.GOROOT, "src/net/http"), 0)
        if err == nil {
                t.Fatalf("found empty parent in %s", p.Dir)
        }
index 335e774a7cf6b0820be6a1309a17df0ffd0406f7..5b2529129cc5ae4bb794d200f670c0cd85ef4402 100644 (file)
@@ -297,7 +297,7 @@ var pkgDeps = map[string][]string{
                "context", "math/rand", "os", "sort", "syscall", "time",
                "internal/nettrace",
                "internal/syscall/windows", "internal/singleflight", "internal/race",
-               "golang.org/x/net/route",
+               "golang_org/x/net/route",
        },
 
        // NET enables use of basic network-related packages.
@@ -378,8 +378,8 @@ var pkgDeps = map[string][]string{
                "context", "compress/gzip", "container/list", "crypto/tls",
                "mime/multipart", "runtime/debug",
                "net/http/internal",
-               "golang.org/x/net/http2/hpack",
-               "golang.org/x/net/lex/httplex",
+               "golang_org/x/net/http2/hpack",
+               "golang_org/x/net/lex/httplex",
                "internal/nettrace",
                "net/http/httptrace",
        },
@@ -443,7 +443,7 @@ func listStdPkgs(goroot string) ([]string, error) {
                }
 
                name := filepath.ToSlash(path[len(src):])
-               if name == "builtin" || name == "cmd" || strings.Contains(name, ".") {
+               if name == "builtin" || name == "cmd" || strings.Contains(name, "golang_org") {
                        return filepath.SkipDir
                }
 
index 352a41d41405b1469ed2f76cf276b286aca7dd48..47e5f577e691e4ccd19e479b23c177b14ac2da6d 100644 (file)
@@ -41,8 +41,8 @@ import (
        "sync"
        "time"
 
-       "golang.org/x/net/http2/hpack"
-       "golang.org/x/net/lex/httplex"
+       "golang_org/x/net/http2/hpack"
+       "golang_org/x/net/lex/httplex"
 )
 
 // ClientConnPool manages a pool of HTTP/2 client connections.
index 4d088a5bb1c8121787dbaa899e107bc8c2bc6365..b34ae41ec517b8e9ff34b8f5872f1e70cb37f2af 100644 (file)
@@ -7,7 +7,7 @@ package http
 import (
        "strings"
 
-       "golang.org/x/net/lex/httplex"
+       "golang_org/x/net/lex/httplex"
 )
 
 // maxInt64 is the effective "infinite" value for the Server and
index 9bf4d667e2e4066c1db59bde7324204e7e26c390..7b2b4b2f42307245e887f9e3a82f390c6b3e69d7 100644 (file)
@@ -28,7 +28,7 @@ import (
        "sync/atomic"
        "time"
 
-       "golang.org/x/net/lex/httplex"
+       "golang_org/x/net/lex/httplex"
 )
 
 // Errors used by the HTTP server.
index b27ace638a191f39587c07cb3d4975acd61342c5..c653467098c8230f832f0fe3a616ffec2efc9594 100644 (file)
@@ -18,7 +18,7 @@ import (
        "strings"
        "sync"
 
-       "golang.org/x/net/lex/httplex"
+       "golang_org/x/net/lex/httplex"
 )
 
 // ErrLineTooLong is returned when reading request or response bodies
index f7904b4a892b6f5e4b7561b662528c8f960adf19..0c81b55e12b6728840b295c4a5336b62668cd389 100644 (file)
@@ -27,7 +27,7 @@ import (
        "sync"
        "time"
 
-       "golang.org/x/net/lex/httplex"
+       "golang_org/x/net/lex/httplex"
 )
 
 // DefaultTransport is the default implementation of Transport and is
index d791cb30167943cc9355cb08635ad9a99efd58fe..35b1c2681592ae88a18f09a67e3a4ed3afb54f91 100644 (file)
@@ -9,7 +9,7 @@ package net
 import (
        "syscall"
 
-       "golang.org/x/net/route"
+       "golang_org/x/net/route"
 )
 
 // If the ifindex is zero, interfaceTable returns mappings of all
index a809b5f5ce49e6cf31e07cea02ab3fe34e6b7736..0b84ca37d4a44787c94f1067e8fb9dd05a994f0c 100644 (file)
@@ -9,7 +9,7 @@ package net
 import (
        "syscall"
 
-       "golang.org/x/net/route"
+       "golang_org/x/net/route"
 )
 
 func interfaceMessages(ifindex int) ([]route.Message, error) {
index bb4fd73a987670bca842c0783d84c03324c3e41d..2ec8e1cc6ef70f10d3ff92d6218c3f4e0731ca09 100644 (file)
@@ -7,7 +7,7 @@ package net
 import (
        "syscall"
 
-       "golang.org/x/net/route"
+       "golang_org/x/net/route"
 )
 
 func interfaceMessages(ifindex int) ([]route.Message, error) {
index 45badd64954a17d087eab9a9540b94acd2d938e4..8a7d6f67c039d4480fdbbefb4e17c9cb13912464 100644 (file)
@@ -7,7 +7,7 @@ package net
 import (
        "syscall"
 
-       "golang.org/x/net/route"
+       "golang_org/x/net/route"
 )
 
 func interfaceMessages(ifindex int) ([]route.Message, error) {