Fork me on GitHub
#honeysql
<
2021-02-01
>
seancorfield00:02:15

Major milestone: HoneySQL v2 repo now passes all the tests (for the first time!). The next two days will be about documentation!

💯 18
🎉 18
catjam 6
😍 3
seancorfield00:02:52

I plan to incorporate a bunch of new tests from a recent v1 PR into the v2 test base as well.

seancorfield00:02:20

I hope to cut a v2 alpha by the end of Tuesday.

seancorfield00:02:48

(I also need to substantially clean up the code 🙂 but that will be an ongoing process now that I have a passing test suite)

Chris O’Donnell16:02:46

Hey @seancorfield, just ran into surprising behavior with the way honeysql formats :values clauses. We were inserting a collection of maps that didn't all have the same keys and discovered after a period of confusion that honeysql picks the columns based off the first map in the :values vector. Would you be amenable to changing this so that honeysql picks the columns to be the union of all keys present in :values maps? Happy to provide a PR.

seancorfield16:02:47

@codonnell I'll fix that for v2 but not for v1 at this point. It's the same behavior as clojure.pprint/print-table BTW.

seancorfield16:02:58

(I don't think it's a bug but I agree it could be a bit surprising -- feel free to open an issue on GH so I don't forget)

seancorfield17:02:14

Thanks! I'll probably work on that for v2 later today.

dharrigan17:02:24

Just a shout out for a big thanks for @seancorfield for doing the work for honeysql v2. Looking forward to it! 🙂

😊 3
☝️ 12
seancorfield18:02:20

@codonnell That is fixed on the v2 branch.

seancorfield21:02:44

@codonnell BTW, the 1.x readme says "the first map defines the columns to insert, and the remaining maps must have the same set of keys and values" (but this restriction is gone in 2.x).

Chris O’Donnell23:02:22

Sorry, I totally missed that! Maybe it's just me, but I don't often consult the Readme anymore except to glance at an example when I don't remember syntax. I'm sure I read the prose some time ago, but didn't remember that detail. Definitely appreciate that is documented.

seancorfield22:02:41

Today I have mostly worked on docstrings for the public API and updating the README to ensure it's all up-to-date and has examples of several new pieces of syntax, as well as ensuring all the tests pass on Clojure 1.9/1.10/1.11 (master) and ClojureScript and that the README example code also all passes (as tests). Code-wise, I'm pretty much at a 2.0.0 Alpha 1 state now for anyone who feels adventurous enough to try it out 🙂

👏 9
seancorfield22:02:09

seancorfield/honeysql {:git/url "" :sha "4cbeb170ddf4ba0d7238c43b092ffb0a33062474"} updated to latest SHA

seancorfield22:02:42

And follow the README here https://github.com/seancorfield/honeysql/tree/v2 (not the develop branch)

seancorfield23:02:11

I'm about to start fleshing out the "differences between v1 and v2" document and then I'll move on to full-blown documentation of v2 later today and most of tomorrow and at some point when I think there's at least enough documentation to support more widespread testing, I'll cut a 2.0.0-alpha1 release on Clojars for folks to use with Leiningen.

seancorfield23:02:45

There's still a lot of work to do but at this point I believe v2 has reached general feature parity with v1 -- although I have deliberately not implemented several of the v1 formatting options (so I'm looking forward to some discussions about what folks rely on from v1 that I would prefer not to implement in v2 🙂 ).