This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-10
Channels
- # announcements (1)
- # babashka (16)
- # beginners (42)
- # calva (6)
- # clj-kondo (7)
- # clj-yaml (13)
- # cljdoc (7)
- # clojure (34)
- # clojure-bay-area (7)
- # clojure-dev (14)
- # clojure-europe (10)
- # clojure-nl (1)
- # clojure-norway (26)
- # clojure-sweden (91)
- # clojurescript (7)
- # datalevin (3)
- # datomic (35)
- # dev-tooling (8)
- # emacs (22)
- # graphql (1)
- # honeysql (13)
- # hyperfiddle (28)
- # introduce-yourself (1)
- # jobs-discuss (11)
- # juxt (4)
- # lsp (21)
- # off-topic (7)
- # reagent (4)
- # releases (3)
- # spacemacs (16)
- # xtdb (4)
- # yamlscript (2)
With clj-yaml is there anyway to retain comments that exist in the file? I am trying to work with a helm chart values file that has loads of useful comments that I want to retain.
a quick google on snakeyaml + comments leads us here: https://github.com/oyse/yedit/issues/15#issuecomment-224613193 so probably no, in the same manner that an EDN or Clojure s-expression parser does not preserve comments
Thanks. This is where the tension between files being for human and computers is an issue. The comments are really useful to explain to auser what they should be doing.
This question seems to point at some option in snakeyaml: https://stackoverflow.com/questions/76781250/how-to-use-snakeyaml-setprocesscomments-on-loaderoptions-and-dumperoptions
I guess we could expose some options here: https://github.com/clj-commons/clj-yaml/blob/ab980163accdaf679090dc5ee93e7858e18768f0/src/clojure/clj_yaml/core.clj#L106 Feel free to file an issue + a PR which includes tests.
I think we can publish a clj-yaml release, but might as well https://github.com/clj-commons/clj-yaml/issues/104 before doing so, ya?
was thinking of adding native image tests to CI as well, do you think that would be useful/helpful @U04V15CAJ?