Skip to content

@embed on orphan files #4302

@tvandinther

Description

@tvandinther

Is your feature request related to a problem? Please describe.
I would like to define a simple one-off CUE file and make use of @embed() to load in files relative to the orphan file.

Describe the solution you'd like
Without initialising a module, I'd like to use @embed(file=foo.yaml,type=yaml) to embed a sibling file named foo.yaml.

Describe alternatives you've considered
Initialising a module would allow this but then you would have to manage a module. There are uses for orphan files over modules which keep things simple, especially for users unfamiliar with CUE but instructed to use it in documentation to perform some task.

Additional context
https://cuelang.slack.com/archives/CLT3ULF6C/p1772813469350559

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions