# Test that adding a new dependency which goes before an existing one
# does not panic due to an unsorted list of module versions.
-- versions --
bar.com
-- want --
module: "main.org@v0"
language: {
	version: "v0.8.0"
}
deps: {
	"bar.com@v0": {
		v: "v0.0.1"
	}
	"foo.com@v0": {
		v: "v0.0.1"
	}
}
-- cue.mod/module.cue --
module: "main.org@v0"
language: version: "v0.8.0"
deps: {
	"foo.com@v0": {
		v: "v0.0.1"
	}
}
-- main.cue --
package main

-- _registry/foo.com_v0.0.1/cue.mod/module.cue --
module: "foo.com@v0"
language: version: "v0.8.0"

-- _registry/foo.com_v0.0.1/foo/x.cue --
package foo

-- _registry/bar.com_v0.0.1/cue.mod/module.cue --
module: "bar.com@v0"
language: version: "v0.8.0"

-- _registry/bar.com_v0.0.1/bar/x.cue --
package bar
