This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-24
Channels
- # announcements (39)
- # aws (4)
- # babashka (18)
- # beginners (32)
- # biff (10)
- # calva (22)
- # clj-kondo (11)
- # clj-on-windows (2)
- # cljs-dev (20)
- # clojure (31)
- # clojure-europe (130)
- # clojure-norway (21)
- # clojure-spec (24)
- # clojure-uk (17)
- # clojured (2)
- # clojurescript (6)
- # conjure (1)
- # core-async (5)
- # cursive (11)
- # datalevin (1)
- # datomic (9)
- # emacs (24)
- # figwheel-main (42)
- # fulcro (6)
- # gratitude (6)
- # honeysql (8)
- # juxt (16)
- # kaocha (6)
- # lsp (235)
- # malli (2)
- # nbb (7)
- # off-topic (23)
- # other-languages (24)
- # pedestal (7)
- # reitit (6)
- # sci (1)
- # shadow-cljs (21)
- # tools-build (22)
- # tools-deps (57)
- # vim (24)
Also just released [nl.jomco/ring-openapi-validator "0.1.3"]
Validates ring requests against openapi (swagger) specs. Includes middleware. See https://git.sr.ht/~jomco/ring-openapi-validator
Can also validate responses :-)
Announcing org.babashka/http-server {:mvn/version "0.1.4"}
- an easy tool to serve static assets during development!
Repo: https://github.com/babashka/http-server
Use with Clojure:
https://github.com/babashka/http-server#clojurehttps://t.co/7sn8XPc7Ga
Use with babashka:
https://github.com/babashka/http-server#babashkahttps://t.co/QUkaOhidlI
Enjoy!
Thanks to @U0522TWDA who made this https://gist.github.com/holyjak/36c6284c047ffb7573e8a34399de27d8 which was in turn based on https://github.com/babashka/babashka/blob/master/examples/image-viewer.clj babashka example. I used several variations of this in my own projects, which eventually became this repo.
awesome! thank you!
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)..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.Syntax error compiling at (babashka/cli.cljc:23:22).
Unable to resolve symbol: parse-double in this context
😞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
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
what was you command Ben when you got that syntax error?
@U064X3EF3 The tool does specify clojure version 1.11 https://github.com/babashka/http-server/blob/main/deps.edn#L1 and also one of its dependencies already did https://github.com/babashka/cli/blob/b6e0156ec79a4db2403673fd8aaa22278e012ea4/deps.edn#L1
well, I repeat my request for knowing the actual command that caused the error (and the CLI version there)
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 yetShouldn't dependencies of tools or in local deps.edn
override what's in your global home deps.edn
though?
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?These are two different parts of the process
Step 1 is to merge the deps.edn
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
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