This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-11
Channels
- # announcements (16)
- # aws (17)
- # babashka (25)
- # beginners (60)
- # calva (40)
- # cider (3)
- # clara (4)
- # clj-kondo (24)
- # clojure (16)
- # clojure-austin (3)
- # clojure-dev (23)
- # clojure-europe (33)
- # clojure-nl (2)
- # clojure-norway (7)
- # clojure-uk (4)
- # clojurescript (39)
- # clr (108)
- # conjure (10)
- # cursive (12)
- # datalevin (7)
- # editors (2)
- # events (1)
- # fulcro (24)
- # graalvm (3)
- # introduce-yourself (8)
- # london-clojurians (2)
- # malli (18)
- # meander (6)
- # missionary (10)
- # nbb (16)
- # off-topic (19)
- # polylith (1)
- # portal (4)
- # rdf (1)
- # reitit (4)
- # remote-jobs (3)
- # shadow-cljs (10)
- # xtdb (12)
I have a question on the
workflow - I need to check my understanding; ideally I would just put a (dev/start! {:report (pretty/reporter)})
inside my user.clj
so that it's executed at startup time. But, if I understand correctly that only start instrumentation for the currently loaded modules (of which there's none at the time of user.clj
execution).
A workflow that works is loading some ns, then go back and dev/start!
again, but is there a workaround that also keeps track of the loaded modules?
Also interested in better ways to do this. You could hook it into integrant/etc workflow or make a shortcut for running that. Best would be if the
would follow the new Var registration itself, tried that once, but got dirty quick. Ideas most welcome.
Thank you, I agree that morally this should belong to a hook on var interning, but I did not know that was possbile at all. What would be the entry point for that?
My understanding was that
would instrument new namespaces correctly, assuming that one used m/=>
and not eg. via metadata on defn.
@U05476190 there doesn't seem to be a difference between m/=>
and metadata for this, do you have an example in mind?
I'm struggling to get decoding working correctly. I want to transform a string timestamp to a clj-time instant: #clj-time/date-time "2023-01-11T15:14:48.964Z"
. (Yes, I know clj-time is deprecated lol). Do I have to define a custom schema for this?
Oh, did those get merged? I remember seeing your PR but didn't follow closely. They've not been released yet, right?
Sadly, we're using leiningen 😭
I'll look at the code on master tho, thanks
Am I doing something wrong here? I thought these would be using the same schema underneath. Maybe I was mistaken
[(m/validate [:double {:min 1}] -1.0)
(m/validate [double? {:min 1}] -1.0)]
;; => [false true]
predicate schemas double?
don’t read any properties like real schemas :double
. As this is a common cause of confusion, options to fix:
1. drop support for predicate schemas, kinda extra anyways
2. map predicate schemas into real schemas
3. finish “schema of schemas” to describe allowed properties so the latter would give a warning in… dev-mode
You mentioned something about not needed to define a describe multimethod for both 'integer?
:integer
. Is that related to 2.
? It seems better to have a single schema for both. I can’t see any downsides.
I think the only way it would break is if you had [double? {:min 1}]
, and it was being ignored. Which a) never happened b) is wrong anyway.