...
1# This test checks that when there are two major versions of a module
2# with no default, we don't try to resolve to one of them, but instead
3# report an error about the ambiguity.
4
5# TODO the error currently does not mention the actual ambiguity that caused
6# the issue - that should be fixed.
7-- want --
8error: failed to resolve "example.com/foo": cannot find module providing package example.com/foo
9-- tidy-check-error --
10module is not tidy: cannot find module providing package example.com/bar@v1
11-- cue.mod/module.cue --
12module: "main.org@v0"
13language: version: "v0.99.99"
14-- main.cue --
15package main
16
17import (
18 "example.com/foo@v0"
19 "example.com/bar@v1"
20)
21-- other.cue --
22package main
23import "example.com/foo"
24
25-- _registry/example.com_v0.0.1/cue.mod/module.cue --
26module: "example.com@v0"
27
28-- _registry/example.com_v0.0.1/foo/foo.cue --
29package foo
30
31-- _registry/example.com_v1.0.0/cue.mod/module.cue --
32module: "example.com@v1"
33
34-- _registry/example.com_v1.0.0/bar/bar.cue --
35package bar
View as plain text