This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-29
Channels
- # babashka (64)
- # beginners (60)
- # calva (10)
- # circleci (3)
- # clj-kondo (62)
- # cljdoc (6)
- # clojars (2)
- # clojure (152)
- # clojure-europe (19)
- # clojure-nl (3)
- # clojure-uk (18)
- # clojurescript (50)
- # clojureverse-ops (12)
- # core-async (21)
- # cursive (6)
- # data-science (1)
- # datomic (17)
- # events (14)
- # fulcro (64)
- # graalvm (20)
- # graphql (5)
- # honeysql (14)
- # jackdaw (3)
- # jobs (1)
- # jobs-discuss (22)
- # kaocha (2)
- # lsp (9)
- # luminus (8)
- # malli (30)
- # meander (31)
- # other-languages (1)
- # polylith (8)
- # re-frame (15)
- # shadow-cljs (85)
- # specter (2)
- # sql (11)
- # tools-deps (56)
- # vim (39)
- # vscode (7)
- # xtdb (16)
Good morning!
I was listening to DSOTM yesterday and today!
Cool: clojure.tools.namespace.repl/refresh
changes meta data:
(:file (meta #'-main))
;; => "/Users/ingo/Projects/Playground/hello-cljsc/src/hello_cljsc/core.clj"
(refresh)
:reloading (hello-cljsc.core hello-cljsc.core-test)
;; => :ok
(:file (meta #'-main))
;; => "hello_cljsc/core.clj"
😡 :face_with_symbols_on_mouth:generally that's not the case
t.n performs a clojure.core/load
(the same primitive clojure.core/require
uses), no more no less. It doesn't go as far as touching vars etc.
maybe there's a small exception for :file but I wonder what difference would it make. Both are values that slurp
will happily accept.
iirc CIDER can also get :file metadata changed from absolute to relative as you send forms to the repl. I wouldn't assume many details about :file
Thanks for digging a little deeper.
> Both are values that `slurp` will happily accept
Yes, it will accept both. But the probability of success decreases rapidly in the latter case. 😜
Funny enough, a failing slurp
of :file
is where my journey started.
Thanks again for spending some time on this!
you're right that slurp won't work, as it lacks src/
however (-> x io/resource slurp)
will work. treating namespaces as resources is definitely idiomatic
Thanks again @U45T93RA6 and have a nice week-end! 🍻
Good morning :flag-eu: peeps! just posted a question on #beginners would appreciate your input ! Is there a "clean" way to use a higher version of java library that is also a transient dependency of another package ? (using the newer version breaks the package)