I've recently discovered your excellent VS Code extension, which I believe will effectively kill my CUE related extension, and cueimports
. ๐
One thing that I haven't yet been able to get working is a package that doesn't match the directory name it's contained in (indicated with the package name after a :
).
In this contrived example, I have the following structure.
โฏ lsd --tree
๏ .
โโโ ๏ cue.mod
โ โโโ ๏ module.cue
โ โโโ ๏ pkg
โ โโโ ๏ usr
โโโ ๏ foo.cue
โโโ ๏ hello
โโโ ๏ world.cue
With a module named example.com/test
.
โฏ cat cue.mod/module.cue
module: "example.com/test"
Inside the hello
directory I have a package named world
(real-world use case is dealing with legacy configuration).
โฏ cat hello/world.cue
package world
#person: {
name: string
}
Then I import the world
package in foo.cue
.
โฏ cat foo.cue
package foo
import "example.com/test/hello:world"
bar: world.#person & {
name: "John"
}
This works fine when I cue export
.
โฏ cue export foo.cue --outfile -
{
"bar": {
"name": "John"
}
}
However, cueimports
ditches the import of the world
package.
โฏ cat foo.cue | cueimports
package foo
bar: world.#person & {
name: "John"
}
I've attached the above in case it helps with troubleshooting.
cue-playground.zip