clj-yaml

Ingy döt Net 2024-01-05T17:15:26.955429Z

I noticed that clj-yaml uses snakeyaml rather than snakeyaml-engine. Is this something we can change?

Ingy döt Net 2024-01-05T17:17:08.945789Z

engine is YAML 1.2 (rather than 1.1) and also the most maintained (I think)

borkdude 2024-01-05T17:25:46.402029Z

I think this has been discussed before (at least here: https://github.com/clj-commons/clj-yaml/discussions/52) changing this would incur breaking changes on current users right? then I don't think we can easily change this

Ingy döt Net 2024-01-05T17:26:41.422759Z

Fair

Ingy döt Net 2024-01-05T17:27:39.340279Z

I have a YAML framework in the works that will eclipse the snakes anyway.

Ingy döt Net 2024-01-05T18:10:52.907179Z

One thing to be aware though is that snakeyaml could itself introduce breaking changes. It does poorly against the yaml test suite https://matrix.yaml.info/, therefore bug "fixes" could become breaking changes in clj-yaml. The 1.2 spec changes are mostly just removing 3 small things that prevent JSON from being a strict subset of YAML. It also removes the annoying things that turn no into a boolean and 12:34:56 into an integer. Other than that nothing much changed.

Ingy döt Net 2024-01-05T18:11:48.898479Z

But I agree, probably best to not do much for clj-yaml and just concentrate on a better YAML solution for Clojure.

borkdude 2024-01-05T18:21:39.311039Z

bb has clj-yaml and I would hate to add yet another yaml library

borkdude 2024-01-05T18:22:07.260999Z

I think most people are better off to adhering to a subset of yaml and not bother with yaml too much

😕 1
borkdude 2024-01-05T18:30:07.030339Z

the issue with adding yet another lib to bb is that it would occupy additional megabytes, I would have liked snakeyaml to grow incrementally such that it supports 1.1 and 1.2 and you can configure this via a flag

borkdude 2024-01-05T18:30:30.785549Z

and not add two entirely different libraries to support 1.2

borkdude 2024-01-05T18:37:28.846599Z

I wonder if we can support 1.2 through the existing clj-yaml library (and as an option), e.g. by preserving "no" , etc?

borkdude 2024-01-05T18:38:28.479609Z

but so far I don't think many people have found issues with it (else we would have heard about it through issues)

Ingy döt Net 2024-01-05T18:39:14.861629Z

yeah