Fork me on GitHub

Also just released [nl.jomco/ring-openapi-validator "0.1.3"] Validates ring requests against openapi (swagger) specs. Includes middleware. See

👏 5
🎉 3

Can also validate responses :-)


Announcing org.babashka/http-server {:mvn/version "0.1.4"} - an easy tool to serve static assets during development! Repo: Use with Clojure: Use with babashka: Enjoy!

👍 16
👏 7
🎉 6

Thanks to @U0522TWDA who made this which was in turn based on babashka example. I used several variations of this in my own projects, which eventually became this repo.


A very nice, I was longing for this, glad you beat me to it!


It was already sitting there for half a year, I just had to add some docs to it :)

Tomas Brejla12:06:16

I never really got into clj tools, but

$ clj -Ttools install io.github.babashka/http-server '{:git/tag "v0.1.3"}' :as serve
$ clj -Tserve exec
is it a good idea to use such an generic "alias" as serve when using the :as alias? If I understand it correctly, it's considered to become a tool name, so I'd expect something like bb-http-server or similar. And use it as clj -Tbb-http-server serve (instead of exec)..

Tomas Brejla12:06:33

I mean upgrade attempt such as

clj -Ttools install-latest :tool serve
feels strange
clj -Ttools install-latest :tool bb-http-server
feels more reasonable to me.


@U01LFP3LA6P The alias is up to the user

truestory 1
Ben Sless13:06:50

Syntax error compiling at (babashka/cli.cljc:23:22).
Unable to resolve symbol: parse-double in this context

Ben Sless13:06:41

Should at least specify it requires 1.11


Will fix that


Try 0.1.4 now


It's funny because org.babashka/cli already depends on clojure 1.11, I would assume the clojure CLI to pull in at least that version.


@UK0810AQ2 How were you "installing" it, as a clj tool, or so?


@UK0810AQ2 Can you try again using 0.1.4? If it persists, then I really don't know. Maybe the clojure version of your deps.edn is prioritized or you should update your clojure CLI? @U064X3EF3: halp... my clj tool depends on clojure 1.11, but somehow for Ben that's not working

Alex Miller (Clojure team)14:06:19

if Clojure version is not not specified, you'll get the version from the root deps.edn in the Clojure CLI install, which matches the first part of the CLI version

Alex Miller (Clojure team)14:06:37

what was you command Ben when you got that syntax error?


I can also see 1.11 pop up here:

$ clj -Spath -Tserve

Alex Miller (Clojure team)15:06:05

well, I repeat my request for knowing the actual command that caused the error (and the CLI version there)

👍 1
Ben Sless15:06:38

I had a version set in my global deps edn and by bumping it was able to use 0.1.3

Alex Miller (Clojure team)15:06:49

why do you have that at all?


Oh, actually I have that too:

:deps {
        org.clojure/clojure {:mvn/version "1.11.0"}
and I'm noticing that this 1.11.0 ends up on my classpath instead of 1.11.1. I had it because I wanted to use 1.11 by default and the clojure CLI didn't have that yet


Shouldn't dependencies of tools or in local deps.edn override what's in your global home deps.edn though?

Alex Miller (Clojure team)16:06:02

No, top level (merged) overrides


but if you have

{:deps {foo/bar v1}
 :aliases {:foo {:extra-deps {foo/bar v2}}}
then clj -A:foo pulls in v2 and not v1 right?

Alex Miller (Clojure team)16:06:49

These are two different parts of the process


but isn't -T treated as some kind of alias, conceptually?

Alex Miller (Clojure team)16:06:46

Step 1 is to merge the deps.edn

Alex Miller (Clojure team)16:06:49

Yes, -T is kind of treated as an an alias, but again, that's part of a later step


I still don't see why a -T clojure version wouldn't override the global home clojure version then

Alex Miller (Clojure team)16:06:56

I'm going to take this to a thread in #tools-deps so we're not spamming here


@UK0810AQ2 note that a global clj dep in user deps.edn is going to override the clj version for all projects

👍 1

See conv in other channel, just wanted to share the summary here