-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This gives the cue command the capability to specify multiple registries. Signed-off-by: Roger Peppe <[email protected]> Change-Id: Iccf78185044ff8a19bce27b42926534ae27c6e8e Reviewed-on: https://review-eu.gerrithub.io/c/cue-lang/cue/+/1170886 TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
- Loading branch information
Showing
5 changed files
with
162 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
env CUE_REGISTRY=${CUE_REGISTRY1},baz.org=$CUE_REGISTRY2 | ||
exec cue eval . | ||
cmp stdout expect-stdout | ||
-- expect-stdout -- | ||
main: "main" | ||
"foo.com/bar/hello@v0": "v0.2.3" | ||
"bar.com@v0": "v0.5.0" | ||
"baz.org@v0": "v0.10.1 in registry2" | ||
"example.com@v0": "v0.0.1" | ||
-- cue.mod/module.cue -- | ||
module: "main.org" | ||
|
||
deps: "example.com@v0": v: "v0.0.1" | ||
|
||
-- main.cue -- | ||
package main | ||
import "example.com@v0:main" | ||
|
||
main | ||
|
||
-- _registry1/example.com_v0.0.1/cue.mod/module.cue -- | ||
module: "example.com@v0" | ||
deps: { | ||
"foo.com/bar/hello@v0": v: "v0.2.3" | ||
"bar.com@v0": v: "v0.5.0" | ||
} | ||
|
||
-- _registry1/example.com_v0.0.1/top.cue -- | ||
package main | ||
|
||
// Note: import without a major version takes | ||
// the major version from the module.cue file. | ||
import a "foo.com/bar/hello" | ||
a | ||
main: "main" | ||
"example.com@v0": "v0.0.1" | ||
|
||
-- _registry1/foo.com_bar_hello_v0.2.3/cue.mod/module.cue -- | ||
module: "foo.com/bar/hello@v0" | ||
deps: { | ||
"bar.com@v0": v: "v0.0.2" | ||
"baz.org@v0": v: "v0.10.1" | ||
} | ||
|
||
-- _registry1/foo.com_bar_hello_v0.2.3/x.cue -- | ||
package hello | ||
import ( | ||
a "bar.com/bar@v0" | ||
b "baz.org@v0:baz" | ||
) | ||
"foo.com/bar/hello@v0": "v0.2.3" | ||
a | ||
b | ||
|
||
|
||
-- _registry1/bar.com_v0.0.2/cue.mod/module.cue -- | ||
module: "bar.com@v0" | ||
deps: "baz.org@v0": v: "v0.0.2" | ||
|
||
-- _registry1/bar.com_v0.0.2/bar/x.cue -- | ||
package bar | ||
import a "baz.org@v0:baz" | ||
"bar.com@v0": "v0.0.2" | ||
a | ||
|
||
|
||
-- _registry1/bar.com_v0.5.0/cue.mod/module.cue -- | ||
module: "bar.com@v0" | ||
deps: "baz.org@v0": v: "v0.5.0" | ||
|
||
-- _registry1/bar.com_v0.5.0/bar/x.cue -- | ||
package bar | ||
import a "baz.org@v0:baz" | ||
"bar.com@v0": "v0.5.0" | ||
a | ||
|
||
|
||
-- _registry1/baz.org_v0.0.2/cue.mod/module.cue -- | ||
module: "baz.org@v0" | ||
|
||
-- _registry1/baz.org_v0.0.2/baz.cue -- | ||
package baz | ||
"baz.org@v0": "v0.0.2" | ||
|
||
-- _registry1/baz.org_v0.1.2/cue.mod/module.cue -- | ||
module: "baz.org@v0" | ||
|
||
-- _registry1/baz.org_v0.1.2/baz.cue -- | ||
package baz | ||
"baz.org@v0": "v0.1.2" | ||
|
||
|
||
-- _registry1/baz.org_v0.5.0/cue.mod/module.cue -- | ||
module: "baz.org@v0" | ||
|
||
-- _registry1/baz.org_v0.5.0/baz.cue -- | ||
package baz | ||
"baz.org@v0": "v0.5.0" | ||
|
||
-- _registry1/baz.org_v0.10.1/cue.mod/module.cue -- | ||
module: "baz.org@v0" | ||
|
||
-- _registry1/baz.org_v0.10.1/baz.cue -- | ||
package baz | ||
"baz.org@v0": "v0.10.1" | ||
|
||
-- _registry2/baz.org_v0.0.2/cue.mod/module.cue -- | ||
module: "baz.org@v0" | ||
|
||
-- _registry2/baz.org_v0.0.2/baz.cue -- | ||
package baz | ||
"baz.org@v0": "v0.0.2" | ||
|
||
-- _registry2/baz.org_v0.1.2/cue.mod/module.cue -- | ||
module: "baz.org@v0" | ||
|
||
-- _registry2/baz.org_v0.5.0/cue.mod/module.cue -- | ||
module: "baz.org@v0" | ||
|
||
-- _registry2/baz.org_v0.5.0/baz.cue -- | ||
package baz | ||
"baz.org@v0": "v0.5.0 in registry2" | ||
|
||
-- _registry2/baz.org_v0.10.1/cue.mod/module.cue -- | ||
module: "baz.org@v0" | ||
|
||
-- _registry2/baz.org_v0.10.1/baz.cue -- | ||
package baz | ||
"baz.org@v0": "v0.10.1 in registry2" |