...

Text file src/cuelang.org/go/internal/mod/modload/testdata/tidy/nested-deps.txtar

Documentation: cuelang.org/go/internal/mod/modload/testdata/tidy

     1# Test a scenario where there are multiple nested dependencies,
     2# and a module that's unused.
     3
     4-- tidy-check-error --
     5module is not tidy: cannot find module providing package example.com.*
     6-- want --
     7module: "main.org@v0"
     8language: {
     9	version: "v0.99.99"
    10}
    11deps: {
    12	"bar.com@v0": {
    13		v: "v0.5.0"
    14	}
    15	"baz.org@v0": {
    16		v: "v0.10.1"
    17	}
    18	"example.com@v0": {
    19		v: "v0.0.1"
    20	}
    21	"foo.com/bar/hello@v0": {
    22		v: "v0.2.3"
    23	}
    24}
    25-- cue.mod/module.cue --
    26module: "main.org@v0"
    27language: {
    28	version: "v0.99.99"
    29}
    30
    31deps: {
    32	"unused.org@v0": v: "v0.2.3"
    33}
    34
    35-- main.cue --
    36package main
    37import "example.com@v0:main"
    38
    39main
    40
    41-- _registry/unused.org_v0.2.3/cue.mod/module.cue --
    42module: "unused.org@v0"
    43-- _registry/unused.org_v0.2.3/top.cue --
    44package unused
    45
    46-- _registry/example.com_v0.0.1/cue.mod/module.cue --
    47module: "example.com@v0"
    48deps: {
    49	"foo.com/bar/hello@v0": v: "v0.2.3"
    50	"bar.com@v0": v: "v0.5.0"
    51}
    52
    53-- _registry/example.com_v0.0.1/top.cue --
    54package main
    55
    56import a "foo.com/bar/hello@v0"
    57a
    58main: "main"
    59"example.com@v0": "v0.0.1"
    60
    61-- _registry/foo.com_bar_hello_v0.2.3/cue.mod/module.cue --
    62module: "foo.com/bar/hello@v0"
    63deps: {
    64	"bar.com@v0": v: "v0.0.2"
    65	"baz.org@v0": v: "v0.10.1"
    66}
    67
    68-- _registry/foo.com_bar_hello_v0.2.3/x.cue --
    69package hello
    70import (
    71	a "bar.com/bar@v0"
    72	b "baz.org@v0:baz"
    73)
    74"foo.com/bar/hello@v0": "v0.2.3"
    75a
    76b
    77
    78-- _registry/bar.com_v0.0.2/cue.mod/module.cue --
    79module: "bar.com@v0"
    80deps: "baz.org@v0": v: "v0.0.2"
    81
    82-- _registry/bar.com_v0.0.2/bar/x.cue --
    83package bar
    84import a "baz.org@v0:baz"
    85"bar.com@v0": "v0.0.2"
    86a
    87
    88
    89-- _registry/bar.com_v0.5.0/cue.mod/module.cue --
    90module: "bar.com@v0"
    91deps: "baz.org@v0": v: "v0.5.0"
    92
    93-- _registry/bar.com_v0.5.0/bar/x.cue --
    94package bar
    95import a "baz.org@v0:baz"
    96"bar.com@v0": "v0.5.0"
    97a
    98
    99
   100-- _registry/baz.org_v0.0.2/cue.mod/module.cue --
   101module: "baz.org@v0"
   102
   103-- _registry/baz.org_v0.0.2/baz.cue --
   104package baz
   105"baz.org@v0": "v0.0.2"
   106
   107
   108-- _registry/baz.org_v0.1.2/cue.mod/module.cue --
   109module: "baz.org@v0"
   110
   111-- _registry/baz.org_v0.1.2/baz.cue --
   112package baz
   113"baz.org@v0": "v0.1.2"
   114
   115
   116-- _registry/baz.org_v0.5.0/cue.mod/module.cue --
   117module: "baz.org@v0"
   118
   119-- _registry/baz.org_v0.5.0/baz.cue --
   120package baz
   121"baz.org@v0": "v0.5.0"
   122
   123
   124-- _registry/baz.org_v0.10.1/cue.mod/module.cue --
   125module: "baz.org@v0"
   126
   127-- _registry/baz.org_v0.10.1/baz.cue --
   128package baz
   129"baz.org@v0": "v0.10.1"

View as plain text