Fork me on GitHub
#clj-yaml
<
2024-01-05
>
Ingy döt Net17:01:26

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

Ingy döt Net17:01:08

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

borkdude17:01:46

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 Net17:01:39

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

Ingy döt Net18:01:52

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 Net18:01:48

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

borkdude18:01:39

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

borkdude18:01:07

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

😕 1
borkdude18:01:07

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

borkdude18:01:30

and not add two entirely different libraries to support 1.2

borkdude18:01:28

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

borkdude18:01:28

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