This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-18
Channels
- # announcements (8)
- # aws (5)
- # babashka (69)
- # beginners (37)
- # calva (222)
- # cider (10)
- # clj-commons (8)
- # clj-kondo (69)
- # cljdoc (5)
- # clojure (62)
- # clojure-dev (23)
- # clojure-europe (37)
- # clojure-italy (2)
- # clojure-nl (6)
- # clojure-sg (6)
- # clojure-uk (5)
- # clojurescript (25)
- # clojureverse-ops (12)
- # conjure (1)
- # cursive (1)
- # fulcro (9)
- # gorilla (1)
- # graalvm (6)
- # graphql (1)
- # gratitude (1)
- # honeysql (7)
- # introduce-yourself (4)
- # jobs (1)
- # kaocha (9)
- # keyboards (4)
- # leiningen (8)
- # lsp (21)
- # malli (9)
- # music (3)
- # nextjournal (17)
- # nrepl (6)
- # off-topic (10)
- # pathom (12)
- # portal (25)
- # reagent (8)
- # releases (1)
- # specter (1)
- # xtdb (1)
Godmorgen 🙂
Bonjour !
Good morning!
Morning! Launch an #nbb REPL from a Node.js program:
import { loadString } from 'nbb'
await loadString(`
(require '[nbb.repl :refer [repl]])
(repl)
`)
console.log('The end!')
$ node repl.mjs
user=> (+ 1 2 3)
6
user=> The end!
😎Out of curiosity: How do you update library versions in Clojure and ClojureScript projects, when you have... let's say... 30 or more dependencies? :thinking_face: We really find it tricky to work out the next set of compatible stable versions of the used libraries – including the Clojure and (even more challenging) ClojureScript version. Any reports from the field?
no good solution. we've got lots of deps... we'll do an across-the-board update once in a while in the run up to a release, and fiddle with :exclusions
and versions until we get something that works
occasionally it's been quite painful
we're still using lein
and we use :pedantic? :abort
which at least forces all conflict resolutions to be explicit
We don’t often see version conflicts, but when we do, it’s always because of Jackson :face_with_monocle:
Yes, even with just my tiny projects Jackson is often a problem. Kind of default to exclude it from all, and set the versions to latest.
@U1Z4D5SSV We generally update our Clojure dependencies any time any of them change but we're much more careful about updating our Java dependencies. Clojure libraries are usually pretty good about not breaking stuff but Java libraries can be horrible. We have one app stuck on Jackson 2.8.11 because 2.9 introduced a breaking change (impacting merge handling with null
values) that breaks that app -- but everything else has been able to move to a more recent version of Jackson.
Caveat: we're already using 1.11 Alpha builds of Clojure in production so we're used to being on the bleeding edge.
I've been thinking of writing a tool which warns you when you depend on a library that's older than the version your dependencies depend on. e.g. if you've upgraded a transitive manually at some point.
Between the stability of clojure & the new tdeps algorithm, there's not much to catch people out anymore.
> I've been thinking of writing a tool which warns you when you depend on a library that's older than the version your dependencies depend on.
I'm looking for a tool where I can paste my project.clj
in and get an updated, shiny new bullet-proof project.clj
out. 😁
@U1Z4D5SSV Isn't that tool called antq?
also there has been lein ancient
for a long time but I'm not sure if that also rewrites your project.clj file
Thanks, @U04V15CAJ! I'll have a look at antq to see if it could ease my pain.
We use antq
at work -- it's great! We run it in "reporting" mode rather than "updating" mode since we know we have a few libs that are not safe to auto-update. It checks dependencies in GH Actions scripts, pom.xml, deps.edn, and a bunch of other stuff.
@raymcdermott Talking about core.specs, I just used a core.spec of defn
with grasp which can be used to find matching expressions in sources.
I wondered which libs are using the trailing metadata map in defn
and found only one:
https://github.com/borkdude/sci/issues/567#issuecomment-945947813