]> Cypherpunks repositories - gostls13.git/commitdiff
cmd: update golang.org/x/mod and vendor
authorJay Conrod <jayconrod@google.com>
Tue, 26 Nov 2019 16:27:25 +0000 (11:27 -0500)
committerJay Conrod <jayconrod@google.com>
Tue, 26 Nov 2019 19:05:22 +0000 (19:05 +0000)
This CL pulls in a fix to golang.org/x/mod/modfile. No change needed
to cmd/go.

Fixes #35737

Change-Id: I7ca1bb46d2923b01587042f0f312d3c3df54c425
Reviewed-on: https://go-review.googlesource.com/c/go/+/208977
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

15 files changed:
src/cmd/go.mod
src/cmd/go.sum
src/cmd/vendor/golang.org/x/mod/modfile/rule.go
src/cmd/vendor/golang.org/x/mod/module/module.go
src/cmd/vendor/golang.org/x/mod/zip/zip.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/asmdecl/asmdecl.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/bools/bools.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/buildtag/buildtag.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/cgocall/cgocall.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/lostcancel/lostcancel.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/shift/shift.go
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/unmarshal.go
src/cmd/vendor/modules.txt

index ab756c8007d96cb88df2a2e2d63177378cc70b67..55ef2395c56953f405a247ddc6f338e2eba436b3 100644 (file)
@@ -7,7 +7,7 @@ require (
        github.com/ianlancetaylor/demangle v0.0.0-20180524225900-fc6590592b44 // indirect
        golang.org/x/arch v0.0.0-20190815191158-8a70ba74b3a1
        golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
-       golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee
+       golang.org/x/mod v0.1.1-0.20191126161957-788aebd06792
        golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 // indirect
-       golang.org/x/tools v0.0.0-20191104222624-6b7b8b79ae80
+       golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
 )
index 09bfadab810da95ca84b1aea36065ddd9ab73577..040f25b617e1c2904f29fcc6d086a3c0c029cc5e 100644 (file)
@@ -7,8 +7,8 @@ golang.org/x/arch v0.0.0-20190815191158-8a70ba74b3a1/go.mod h1:flIaEI6LNU6xOCD5P
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E=
-golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.1.1-0.20191126161957-788aebd06792 h1:04Uqz7R2BD7irAGgQtrKNW5tLa50RgSW71y4ofoaivk=
+golang.org/x/mod v0.1.1-0.20191126161957-788aebd06792/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -18,8 +18,8 @@ golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 h1:vsphBvatvfbhlb4PO1BYSr9dz
 golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/tools v0.0.0-20191104222624-6b7b8b79ae80 h1:6CcDC1SXj4DrJP955osT9RJmKsH3LQBZJ59D5v4Rw0s=
-golang.org/x/tools v0.0.0-20191104222624-6b7b8b79ae80/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e h1:aZzprAO9/8oim3qStq3wc1Xuxx4QmAGriC4VU4ojemQ=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
index 292d5b60b5770c3f75b3dd019ac963b59966bed8..62af06889f60a86cbfe68d6bfc304ecbe6a64367 100644 (file)
@@ -313,8 +313,8 @@ func isIndirect(line *Line) bool {
        if len(line.Suffix) == 0 {
                return false
        }
-       f := strings.Fields(line.Suffix[0].Token)
-       return (len(f) == 2 && f[1] == "indirect" || len(f) > 2 && f[1] == "indirect;") && f[0] == "//"
+       f := strings.Fields(strings.TrimPrefix(line.Suffix[0].Token, string(slashSlash)))
+       return (len(f) == 1 && f[0] == "indirect" || len(f) > 1 && f[0] == "indirect;")
 }
 
 // setIndirect sets line to have (or not have) a "// indirect" comment.
@@ -329,13 +329,17 @@ func setIndirect(line *Line, indirect bool) {
                        line.Suffix = []Comment{{Token: "// indirect", Suffix: true}}
                        return
                }
-               // Insert at beginning of existing comment.
+
                com := &line.Suffix[0]
-               space := " "
-               if len(com.Token) > 2 && com.Token[2] == ' ' || com.Token[2] == '\t' {
-                       space = ""
+               text := strings.TrimSpace(strings.TrimPrefix(com.Token, string(slashSlash)))
+               if text == "" {
+                       // Empty comment.
+                       com.Token = "// indirect"
+                       return
                }
-               com.Token = "// indirect;" + space + com.Token[2:]
+
+               // Insert at beginning of existing comment.
+               com.Token = "// indirect; " + text
                return
        }
 
index 21f123957da9c15400023e7714b798112ddc92d5..6cd37280a85f5c29a0b36cab19bc2a864be3e686 100644 (file)
@@ -123,8 +123,12 @@ type Version struct {
        Version string `json:",omitempty"`
 }
 
-// String returns the module version syntax Path@Version.
+// String returns a representation of the Version suitable for logging
+// (Path@Version, or just Path if Version is empty).
 func (m Version) String() string {
+       if m.Version == "" {
+               return m.Path
+       }
        return m.Path + "@" + m.Version
 }
 
index d2811def7a1c301b3433849dd05e3aa380fa7583..37c764257e4bec73472f66d82d36b96ef89dfb89 100644 (file)
@@ -234,6 +234,8 @@ func Create(w io.Writer, m module.Version, files []File) (err error) {
 // belong in the module zip. In particular, CreateFromDir will not include
 // files in modules found in subdirectories, most files in vendor directories,
 // or irregular files (such as symbolic links) in the output archive.
+// Additionally, unlike Create, CreateFromDir will not include directories
+// named ".bzr", ".git", ".hg", or ".svn".
 func CreateFromDir(w io.Writer, m module.Version, dir string) (err error) {
        defer func() {
                if zerr, ok := err.(*zipError); ok {
@@ -257,6 +259,14 @@ func CreateFromDir(w io.Writer, m module.Version, dir string) (err error) {
                                return nil
                        }
 
+                       // Skip VCS directories.
+                       // fossil repos are regular files with arbitrary names, so we don't try
+                       // to exclude them.
+                       switch filepath.Base(filePath) {
+                       case ".bzr", ".git", ".hg", ".svn":
+                               return filepath.SkipDir
+                       }
+
                        // Skip some subdirectories inside vendor, but maintain bug
                        // golang.org/issue/31562, described in isVendoredPackage.
                        // We would like Create and CreateFromDir to produce the same result
index c2e89ee2dc67b72af45df4ad07d1f3e2f3276171..5c93a4f70304de364dd2497b80febd63893994fb 100644 (file)
@@ -22,9 +22,11 @@ import (
        "golang.org/x/tools/go/analysis/passes/internal/analysisutil"
 )
 
+const Doc = "report mismatches between assembly files and Go declarations"
+
 var Analyzer = &analysis.Analyzer{
        Name: "asmdecl",
-       Doc:  "report mismatches between assembly files and Go declarations",
+       Doc:  Doc,
        Run:  run,
 }
 
index fbc1f7ea91480659497487730af0268c49d5cca7..5ae47d8948f1dbbca4108f99fef7cba330442697 100644 (file)
@@ -17,9 +17,11 @@ import (
        "golang.org/x/tools/go/ast/inspector"
 )
 
+const Doc = "check for common mistakes involving boolean operators"
+
 var Analyzer = &analysis.Analyzer{
        Name:     "bools",
-       Doc:      "check for common mistakes involving boolean operators",
+       Doc:      Doc,
        Requires: []*analysis.Analyzer{inspect.Analyzer},
        Run:      run,
 }
index 5a441e609b6298e05477e37bf24dabaebb4cf411..78176f10114131f3ee5114e2fe049953b7c2b2f6 100644 (file)
@@ -16,9 +16,11 @@ import (
        "golang.org/x/tools/go/analysis/passes/internal/analysisutil"
 )
 
+const Doc = "check that +build tags are well-formed and correctly located"
+
 var Analyzer = &analysis.Analyzer{
        Name: "buildtag",
-       Doc:  "check that +build tags are well-formed and correctly located",
+       Doc:  Doc,
        Run:  runBuildTag,
 }
 
index d499f3c3299d3b85dea93d9866c2267aa425b2d2..1b7b8d2de76772e5741f85c610b34b0d9a18690e 100644 (file)
@@ -23,7 +23,7 @@ import (
 
 const debug = false
 
-const doc = `detect some violations of the cgo pointer passing rules
+const Doc = `detect some violations of the cgo pointer passing rules
 
 Check for invalid cgo pointer passing.
 This looks for code that uses cgo to call C code passing values
@@ -34,7 +34,7 @@ or slice to C, either directly, or via a pointer, array, or struct.`
 
 var Analyzer = &analysis.Analyzer{
        Name:             "cgocall",
-       Doc:              doc,
+       Doc:              Doc,
        RunDespiteErrors: true,
        Run:              run,
 }
index cd3740714488c3ef54ff1e60bec0051b8751faa5..b80271afb9515c0a111b6fe17b2825aeba2a6b37 100644 (file)
@@ -16,14 +16,14 @@ import (
        "golang.org/x/tools/go/types/typeutil"
 )
 
-const doc = `report passing non-pointer or non-error values to errors.As
+const Doc = `report passing non-pointer or non-error values to errors.As
 
 The errorsas analysis reports calls to errors.As where the type
 of the second argument is not a pointer to a type implementing error.`
 
 var Analyzer = &analysis.Analyzer{
        Name:     "errorsas",
-       Doc:      doc,
+       Doc:      Doc,
        Requires: []*analysis.Analyzer{inspect.Analyzer},
        Run:      run,
 }
index 85e7ba7a8efee0d32f494424a403e7dc605f78e0..de6f840f685005bb3f5c3163e91aacfd3d476bfe 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Package lostcancel defines an Analyzer that checks for failure to
-// call a context cancelation function.
+// call a context cancellation function.
 package lostcancel
 
 import (
@@ -20,7 +20,7 @@ import (
 
 const Doc = `check cancel func returned by context.WithCancel is called
 
-The cancelation function returned by context.WithCancel, WithTimeout,
+The cancellation function returned by context.WithCancel, WithTimeout,
 and WithDeadline must be called or the new context will remain live
 until its parent context is cancelled.
 (The background context is never cancelled.)`
index 38a752c957318fef9a8502fa4f1b48edb24cd08b..a81dba912518a0183c10f7d0a78865c75d0d0a8e 100644 (file)
@@ -33,14 +33,14 @@ func init() {
 
 var Analyzer = &analysis.Analyzer{
        Name:       "printf",
-       Doc:        doc,
+       Doc:        Doc,
        Requires:   []*analysis.Analyzer{inspect.Analyzer},
        Run:        run,
        ResultType: reflect.TypeOf((*Result)(nil)),
        FactTypes:  []analysis.Fact{new(isWrapper)},
 }
 
-const doc = `check consistency of Printf format strings and arguments
+const Doc = `check consistency of Printf format strings and arguments
 
 The check applies to known functions (for example, those in package fmt)
 as well as any detected wrappers of known functions.
index 0db95dafb07bc6e4cf9270878ba3cc6911201e34..1f3df07ccd1fabea0ada98583ba268d13fb90843 100644 (file)
@@ -21,9 +21,11 @@ import (
        "golang.org/x/tools/go/ast/inspector"
 )
 
+const Doc = "check for shifts that equal or exceed the width of the integer"
+
 var Analyzer = &analysis.Analyzer{
        Name:     "shift",
-       Doc:      "check for shifts that equal or exceed the width of the integer",
+       Doc:      Doc,
        Requires: []*analysis.Analyzer{inspect.Analyzer},
        Run:      run,
 }
index d019ecef15a028ca5951f6327944892d4c5c7e1c..f9cc993cbb42639c2482398d5504c2b22fca3088 100644 (file)
@@ -16,14 +16,14 @@ import (
        "golang.org/x/tools/go/types/typeutil"
 )
 
-const doc = `report passing non-pointer or non-interface values to unmarshal
+const Doc = `report passing non-pointer or non-interface values to unmarshal
 
 The unmarshal analysis reports calls to functions such as json.Unmarshal
 in which the argument type is not a pointer or an interface.`
 
 var Analyzer = &analysis.Analyzer{
        Name:     "unmarshal",
-       Doc:      doc,
+       Doc:      Doc,
        Requires: []*analysis.Analyzer{inspect.Analyzer},
        Run:      run,
 }
index e1a880c677a6951f4d126b22a01ae14a74b16529..757a4c37938f19ce13d2cc2a1fc8dceb4609abd9 100644 (file)
@@ -29,7 +29,7 @@ golang.org/x/arch/x86/x86asm
 golang.org/x/crypto/ed25519
 golang.org/x/crypto/ed25519/internal/edwards25519
 golang.org/x/crypto/ssh/terminal
-# golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee
+# golang.org/x/mod v0.1.1-0.20191126161957-788aebd06792
 ## explicit
 golang.org/x/mod/internal/lazyregexp
 golang.org/x/mod/modfile
@@ -44,7 +44,7 @@ golang.org/x/mod/zip
 ## explicit
 golang.org/x/sys/unix
 golang.org/x/sys/windows
-# golang.org/x/tools v0.0.0-20191104222624-6b7b8b79ae80
+# golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
 ## explicit
 golang.org/x/tools/go/analysis
 golang.org/x/tools/go/analysis/internal/analysisflags