Text file src/cmd/go/testdata/script/mod_indirect_main.txt

     1  env GO111MODULE=on
     2  
     3  # Regression test for golang.org/issue/29773: 'go list -m' was not following
     4  # dependencies through older versions of the main module.
     5  
     6  go list -f '{{with .Module}}{{.Path}}{{with .Version}} {{.}}{{end}}{{end}}' all
     7  cmp stdout pkgmods.txt
     8  
     9  go list -m all
    10  cmp stdout mods.txt
    11  
    12  go mod graph
    13  cmp stdout graph.txt
    14  
    15  -- go.mod --
    16  module golang.org/issue/root
    17  
    18  go 1.12
    19  
    20  replace (
    21  	golang.org/issue/mirror v0.1.0 => ./mirror-v0.1.0
    22  	golang.org/issue/pkg v0.1.0 => ./pkg-v0.1.0
    23  	golang.org/issue/root v0.1.0 => ./root-v0.1.0
    24  )
    25  
    26  require golang.org/issue/mirror v0.1.0
    27  
    28  -- root.go --
    29  package root
    30  
    31  import _ "golang.org/issue/mirror"
    32  
    33  -- mirror-v0.1.0/go.mod --
    34  module golang.org/issue/mirror
    35  
    36  require golang.org/issue/root v0.1.0
    37  
    38  -- mirror-v0.1.0/mirror.go --
    39  package mirror
    40  
    41  import _ "golang.org/issue/pkg"
    42  
    43  -- pkg-v0.1.0/go.mod --
    44  module golang.org/issue/pkg
    45  
    46  -- pkg-v0.1.0/pkg.go --
    47  package pkg
    48  
    49  -- root-v0.1.0/go.mod --
    50  module golang.org/issue/root
    51  
    52  require golang.org/issue/pkg v0.1.0
    53  
    54  -- pkgmods.txt --
    55  golang.org/issue/mirror v0.1.0
    56  golang.org/issue/pkg v0.1.0
    57  golang.org/issue/root
    58  -- mods.txt --
    59  golang.org/issue/root
    60  golang.org/issue/mirror v0.1.0 => ./mirror-v0.1.0
    61  golang.org/issue/pkg v0.1.0 => ./pkg-v0.1.0
    62  -- graph.txt --
    63  golang.org/issue/root go@1.12
    64  golang.org/issue/root golang.org/issue/mirror@v0.1.0
    65  golang.org/issue/mirror@v0.1.0 golang.org/issue/root@v0.1.0
    66  golang.org/issue/root@v0.1.0 golang.org/issue/pkg@v0.1.0
    67  

View as plain text