Skip to content

Instantly share code, notes, and snippets.

@ikitommi
Last active September 1, 2024 08:53
Show Gist options
  • Save ikitommi/8c904bfaa17f3871f80d3e20ea84ebb7 to your computer and use it in GitHub Desktop.
Save ikitommi/8c904bfaa17f3871f80d3e20ea84ebb7 to your computer and use it in GitHub Desktop.
Clojurians Together 2024

Clojurists Together Project Update, 01-02/2024, Tommi Reiman

Worked on a big new release of Malli and wrote a blog post about it.

Reitit should be now feature-complete for OpenAPI, will cut out release soon.

Helped users to use and adopt the libs.

0.14.0 (2024-01-16)

  • Better development-time tooling
    • malli.dev/start! captures all malli-thrown exceptions, see [README](README.md#development-mode for details
    • does not log individual re-instrumentation of function vars
    • BREAKING: changes in malli.dev.virhe and malli.pretty extension apis, wee #980 for details
  • New m/deref-recursive to recursive deref all schemas (not :refs)
  • FIX: Malli generates incorrect clj-kondo spec for :fn schemas #836 via #987
  • Support for Var references #985, see [guide](README.md#var-registry for details.
  • BREAKING: m/coerce and m/coercer throw ::m/coercion instead of ::m/invalid-input
  • New Guide for Reusable Schemas
  • Less printing of Var instumentation
  • BREAKING: qualified symbols are valid reference types #984
  • Fixing mt/strip-extra-keys-transformer for recursive map encoding #963
  • Support passing custom :type in into-schema opt for :map and :map-of #968
  • mu/path->in works with :orn, :catn and :altn.

Something else

Teppo the Dog enjoying the Sun at Näsijärvi.

spring-fi

Clojurists Together Project Update, 03-04/2024, Tommi Reiman

Finally! Reitit 0.7.0 is out. It has been over a year in the making, spanning multiple libraries: reitit, malli, schema-tools, [spec-tools](https://github.com/metosin/spec-tools and ring-swagger-ui. Big thanks to everyone involved. There is a lot of draft work that has been queued and can now be worked on. New releases should come more frequently in the future.

Reitit 0.7.0 (all 8 alphas flattened)

0.7.0 (2024-04-30)

The OpenAPI3 release, Year in the making - the changes span over multiple repositories!

  • Openapi3 support, see the docs

    • Fetch OpenAPI content types from Muuntaja #636
    • OpenAPI 3 parameter descriptions get populated from malli/spec/schema descriptions. #612
    • Generate correct OpenAPI $ref schemas for malli var and ref schemas #673
    • new syntax for :request and :response per-content-type coercions. See coercion.md. #627
    • #84
  • Handlers can be vars #585

  • Fix swagger generation when unsupported coercions are present #671

  • BREAKING: require Clojure 1.11, drop support for Clojure 1.10

  • BREAKING: compile-request-coercers returns a map with :data and :coerce instead of plain :coerce function

  • BREAKING: Parameter and Response schemas are merged into the route data vector - so they can be properly merged into the compiled result, fixes #422 - merging multiple schemas together works with Malli and Schema, partially with data-spec but not with spec.

  • Fixed some module dependencies so Cljdoc can properly analyze all the modules

  • Fix reading fragment string on Html5History initialization

  • Add fragment string parameter to reitit-frontend functions (#604)

  • Frontend: provide easy way to update current query params. #600

  • Updated dependencies:

[metosin/malli "0.16.1"] is available but we use "0.10.1"
[metosin/muuntaja "0.6.10"] is available but we use "0.6.8"
[metosin/spec-tools "0.10.6"] is available but we use "0.10.5"
[metosin/schema-tools "0.13.1"] is available but we use "0.13.0"
[metosin/jsonista "0.3.8"] is available but we use "0.3.7"
[com.fasterxml.jackson.core/jackson-core "2.17.0"] is available but we use "2.14.2"
[com.fasterxml.jackson.core/jackson-databind "2.17.0"] is available but we use "2.14.2"
[ring/ring-core "1.12.1"] is available but we use "1.9.6"
[metosin/ring-swagger-ui "5.9.0"] is available but we use "4.15.5"

Malli

0.16.1 (2024-04-30)

  • Enabled Java8 tests back, no need to limit the version.

0.16.0 (2024-04-20)

  • BREAKING: minimum Java-version is now Java11
  • allow changing prefix of json-schema $refs via option :malli.json-schema/definitions-path #1045
  • Inline refs in non-:body swagger parameters #1044
  • Fix flaky test #1040
  • Utility to update entry properties: mu/update-entry-properties #1037
  • Fix actions cache #1036
  • Only humanize one of :min / :max when different #1032
  • Distinguish between symbols and strings in humanize #1031
  • Fix :map-of :min and unreachable generator, explain such-that failures #1029

0.15.0 (2024-03-23)

  • :=> takes optional 3rd child, the guard schema validating vector of arguments and return value [args ret]. See Function Guards for more details. Fixes #764 and #764.
;; function of arg:int -> ret:int, where arg < ret
[:=> 
 [:cat :int] 
 :int 
 [:fn (fn [[[arg] ret]] (< arg ret))]]
  • BREAKING: malli.generator/function-checker returns explanations under new keys:

    • ::mg/explain-input -> ::m/explain-input
    • ::mg/explain-output -> ::m/explain-output
    • new ::m/explain-guard to return guard explanation, if any
  • m/explain for :=> returns also errors for args, return and guard if they exist

  • FIX m/deref-recursive doesn't play nice with :merge schema #997 via #999

  • FIX nested :repeat sequence schema's doesn't seem to work #761 via #1024

  • FIX Invalid Swagger JSON with [:or :nil] alternatives #1006 via #1023

  • FIX (explain :tuple []) #1022

  • Enforce entry specs in open map destructurings #1021

  • FIX goog/mixin was deprecated and is now removed #1016

  • Updated dependencies:

borkdude/edamame 1.3.23 -> 1.4.25

Something else

Back at Greece, to relax and to Open Source.

os-greece

Clojurists Together Project Update, 05-06/2024, Tommi Reiman

Started my 3 month sabbatical in June with a road-trip with the kids, a welcome reset! Now back to home, learning and doing. Refreshed my knowledge of latest TypeScript, Zod and XState with an goal to pull some of the good things to Clojure (into Malli + a fully Xstate-compatible FSM-library). Also working on a template-project with monorepo + malli + reitit, using Java21 and Virtual Threads.

Library Releases

reitit 0.7.1 (active)

Fixing regression bugs from 0.7.0 + latest features via dependent libraries. Changelog here.

malli 0.16.2 (active)

Welcome Experimental Simplified Function Schemas!

[:-> :any] ; [:=> :cat :any]
[:-> :int :any] ; [:=> [:cat :int] :any]
[:-> [:cat :int] :any]  ; [:=> [:cat [:cat :int]] :any]
[:-> a b c d :any] ; [:=> [:cat a b c d] :any]

;; guard property
[:-> {:guard (fn [[[arg] ret]] ...)} :string :boolean]
; [:=> [:cat :string] :boolean [:fn (fn [[[arg] ret]] ...)]]

Also, small fixes and additions. Changelog here.

There is a big bunch of WIP work from myself and contributors waiting to be finished.

jsonista 0.3.9 (stable)

:do-not-fail-on-empty-beans option + updated dependencies, Changelog here

ring-http-response 0.9.4 (stable)

Teapots welcome! Changelog here.

spec-tools 0.10.7 (inactive)

Small fixes and improvements, Changelog here. If you are a user of spec-tools and want to help, feel free to ping me on Clojurians Slack, happy to take a new contributor here.

Something Else

Old abandoned Soviet-era sanatorium in Latvia.

baltics

Clojurists Together Project Update, 07-08/2024, Tommi Reiman

Two big release of malli and lot's of WIP work. Explored existing and new Clojure-bindings (with Malli) with latest features of both Anthropic and OpenAIs APIs, one gist here.

Added Ambrose Bonnaire-Sergeant as a maintainer to malli. Lot's of good disucssions on how the library should go forward. Here's the Q3 Clojureist Together funding announcement for his work.

Library Releases

malli 0.16.4

  • Distribute :merge over :multi #1086, see documentation
  • :multi with keyword :dispatch accumulates data to generated values #1095
  • Allow m/-proxy-schema child to be a delay #1090
  • json-transformer decodes 123.0 into 123 for schemas like :int, pos-int? etc. #986
  • Fix malli.dev.pretty throws when explaining errors in nested maps #1094
  • Fix ClojureScript arithmetic warning
  • Fix (-some-pred []) should return false #1101
  • Doc mu/assoc and mu/dissoc only handle one key at a time #1099
  • Try to make map-of-min-max-test less flaky by fixing seed #1098
  • Updated dependencies:
borkdude/edamame '1.4.25' to '1.4.27'

malli 0.16.3

  • :-> added to default registry, see documentation.
  • New :seqable and :every schemas #1041, see docs
  • Fix OOM error with infinitely expanding schema #1069
  • Correctly form prop-less schemas that have map/nil as first child #1071
  • Support min/max on uncountables like eductions #1075
  • Fix clj-kondo can't parse config.edn written by (malli.dev/start!) #1083
  • unstrument before instrumenting #1081
  • Replace .entryAt with .valAt during validation #1079
  • Corrected DEPRECATED warning for m/-simple-schema #1077

Something Else

Back in the baltics, this time in Lithuania.

vilna

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment