exec cue eval ./pkg:foo
-- cue.mod/module.cue --
module: "mod.test"
language: version: "v0.9.0"
-- in.cue --
package test

import pkg2 "mod.test/foo/pkg1"

#pkg1: pkg2.Object

"Hello \(#pkg1)!"
-- foo/pkg1/file.cue --
package pkg1

Object: "World"
-- out/compile --
--- in.cue
{
  #pkg1: 〈import;"mod.test/foo/pkg1"〉.Object
  "Hello \(〈0;#pkg1〉)!"
}
