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

Upgrading YAML spec from 1.1 to 1.2? #178

Closed
ickc opened this issue Dec 19, 2020 · 2 comments
Closed

Upgrading YAML spec from 1.1 to 1.2? #178

ickc opened this issue Dec 19, 2020 · 2 comments

Comments

@ickc
Copy link
Collaborator

ickc commented Dec 19, 2020

by switching dependency from pyyaml to ruamel.yaml.

Not actionable for now as we should wait for a final decision from upstream. c.f. jgm/pandoc#4535

TL;DR: pandoc switch from YAML 1.1 to 1.2 recently, but option is still open to revert that change. If the final decision is to stay with HsYAML with YAML 1.2 spec, then I think we should migrate to YAML 1.2 too to have a more uniform YAML experience (e.g. YAML codeblock in panflute do our own YAML parsing.)

ruamel.yaml is a fork of pyyaml, which also has a fork of libyaml which implements YAML 1.2. ruamel.yaml has a different API recently, but shouldn't be a big problem. Also, it has widely been used and supported, e.g. in conda-forge both share the same support across platforms. In my own testing ruamel.yaml is about a factor of 2 slower than pyyaml, and both grows roughly linear time.

More info (copy from my jgm/pandoc#4535 (comment)):

Edit: see https://gist.github.com/ickc/f9d6c57338d4be07f6cf70991d462fc3 for a benchmark. (You cannot see the plot using the rendering on GitHub directly.)

@ickc
Copy link
Collaborator Author

ickc commented Oct 27, 2021

Upstream decided to switch bach to YAML 1.1.

See

@ickc ickc closed this as completed Oct 27, 2021
@jgm
Copy link

jgm commented Oct 27, 2021

Note, no decision has been made yet. We have a PR but it hasn't been merged.

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

No branches or pull requests

2 participants