Skip to content

std.parseYaml() fails to parse 3 digits versions #1014

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

Closed
ericcitaire opened this issue Sep 6, 2022 · 5 comments
Closed

std.parseYaml() fails to parse 3 digits versions #1014

ericcitaire opened this issue Sep 6, 2022 · 5 comments
Assignees
Labels

Comments

@ericcitaire
Copy link

Simplest way to reproduce :

$ jsonnet -e "std.parseYaml('version: 1.2.3')"
Something went wrong during jsonnet_evaluate_snippet, please report this: [json.exception.parse_error.101] parse error at line 1, column 16: syntax error while parsing object - invalid literal; last read: '1.2.'; expected '}'
[1]    443873 IOT instruction (core dumped)  jsonnet -e "std.parseYaml('version: 1.2.3')"

It seems to be parsing a float instead of a string.

@ericcitaire
Copy link
Author

This was fixed in rapidyaml a few days ago : biojppm/rapidyaml#299

@sbarzowski sbarzowski added the bug label Sep 11, 2022
@sbarzowski
Copy link
Collaborator

I guess go-jsonnet would work fine, as it uses a different YAML parser.

We should bump the rapidyaml version here.

@jzhn
Copy link

jzhn commented Jun 9, 2023

Hi, is there any plan to update rapidyaml version in jsonnet to address the issue? Not sure why this issue wasn't fixed in the v0.20.0 cycle.

@johnbartholomew johnbartholomew self-assigned this Feb 9, 2024
@johnbartholomew
Copy link
Collaborator

I'm upgrading Rapid YAML in #1134 - I'll confirm this works then.

@johnbartholomew
Copy link
Collaborator

Should work on master now. I have added a test case for it (#1135). Thanks for the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants