clj-yaml 2023-08-02

I've looked at the snake classes and can see what I need to do... I'm trying to decide if it would be easier to 1. write something around clj-yaml (which already has everything put together nicely) 2. write something new around snakeyaml directly (referring to clj-yaml for direction as I go, of course)

May I suggest, just playing around with 2 first, use it privately for a couple of months, then learn the lessons how the API needs to be written to be used, and then we can move it to clj-yaml, if it turns out to be more generally useful? This way we don't have to commit to a new API that is not battle tested yet. Once we're committing to an API, we will never change, backward compatibility is rule nr 1 in clojure

Unless it's a very trivial thing of course

by number 1, I meant writing a new ingy/snakeyaml-parser package altogether, and just using clj-yaml as a dependency

that's always possible of course

I guess you could start that way and if clj-yaml gets in the way, you just inline whatever you need in your lib

but probably better to do number 2, just to get experience making new clojure packages (is package the right term here?)

we call it libraries

of course, sorry

my head's in too many rabbitholes atm

no worries, just take it one step at a time :)

✅ 1

Thing to consider is once you publish a library to clojars, Clojure folks will typically assume your API will never break.

You can always have "alpha" caveats in your description tho.

I doubt this library will get much usage by anyone but me, but good point

what people typically do is just have the library available on github, you can refer libraries via a SHA

there's no need to publish it to clojars, unless you want to serve leiningen users

or if you have compiled Java artifacts

but even that can be accomplished without publishing to clojars

I would like practice publishing to clojars for other reasons 🙂

I realized I had already published to clojars last summer (as a test and immediately forgot)

Funny thing, writing that pst tool is actually how I learned about Clojure at all!

I was just looking for 42 languages to support

I never did get all the way through publishing to maven central yet though. Remember that being a royal pain.

And full circle (yaml-wise) I started pst because I want to write a full-featured, common-api YAML framework in 42 languages... So I needed to learn how to publish stuff in 42 languages. And I figured if I did that, I should save anyone else the torture by making a packaging tool that did things the same way in 42 languages. 😄

Not sure if it is relevant to your pst effort, but a while ago I stumbled upon, but never looked into https://jreleaser.org/.

Definitely looks worth exploring. pst wraps lein but can take advantage of anything better.

https://foojay.io/today/how-to-release-a-java-module-with-jreleaser-to-maven-central-with-github-actions/#:~:text=JReleaser%20is%20a%20tool%20that,their%20modules%20to%20Maven%20Central. looks cool. Found it while I was trying to verify that jreleaser could actually publish to maven central. Didn't see that explicitly on http://jreleaser.org page

@hifumi123 have you seen jreleaser before? ^^

I have not. For deployment I have always used Leiningen

I struggled and failed to get stuff to maven central using lein (iirc) a year ago. If I can figure it out I'll wrap it into the pst flow.

I recall following a guide but giving up. I'll try again soon. Thanks.

I started a #yaml for general yaml conversation if anyone's interested...

lein new library snakeyaml-parser-events created a project.clj file but clj-yaml uses deps.edn which seems more standard around here. Is library not the best template? Or is lein not the best tooling for making new projects?

@ingy I recommend just starting with #tools-deps which is the official tool whereas lein is a community project and doesn't let you use git or local deps as easy

I recommend reading their guides and references and if you're stuck ask for help in #tools-deps

I did realize that the topic is not specific to here, but all the context is here, so felt best to start here.

Thanks for the pointers.

Rush++ 🙂

sure no problem, but all the people who know most about #tools-deps are in #tools-deps, that's why I suggested it

Appears there's no avoiding bb in this world. Installing now 🤠

@ingy Here is a super short quickstart, to get something going: https://blog.michielborkent.nl/new-clojure-project-quickstart.html

@hifumi123 has joined the channel