Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/encoding/yaml: support alias to scalars in map key (fixes #3821) #3822

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

OmriSteiner
Copy link

@OmriSteiner OmriSteiner commented Mar 16, 2025

This makes the decoder follow aliases in YAML map keys. Before this commit the decoder would outright reject these keys as non-scalar keys. This commit adds support specifically for keys which are aliases to scalar values. YAML also permits non-scalar keys such as maps / sequences, but there's no equivalent for those in CUE, so we error out.

fixes #3821

This makes the decoder follow aliases in YAML map keys.
Before this commit the decoder would outright reject these keys as
non-scalar keys. This commit adds support specifically for keys which
are aliases to scalar values. YAML also permits non-scalar keys such as
maps / sequences, but there's no equivalent for those in CUE, so we
error out.

fixes cue-lang#3821

Signed-off-by: Omri Steiner <[email protected]>
@OmriSteiner OmriSteiner requested a review from cueckoo as a code owner March 16, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

YAML decoder does not handle aliases in map keys
1 participant