This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-01
Channels
- # announcements (10)
- # asami (2)
- # babashka (10)
- # beginners (55)
- # biff (37)
- # calva (9)
- # cherry (1)
- # clj-kondo (11)
- # clojure (221)
- # clojure-bay-area (12)
- # clojure-europe (77)
- # clojure-hungary (3)
- # clojure-nl (5)
- # clojure-norway (12)
- # clojurescript (11)
- # cursive (1)
- # data-science (11)
- # emacs (27)
- # figwheel (3)
- # fulcro (11)
- # graphql (5)
- # helix (7)
- # honeysql (3)
- # humbleui (9)
- # interceptors (2)
- # introduce-yourself (2)
- # kaocha (12)
- # lsp (27)
- # malli (6)
- # nbb (70)
- # off-topic (6)
- # re-frame (6)
- # react (3)
- # reitit (9)
- # releases (2)
- # scittle (29)
- # shadow-cljs (26)
- # sql (13)
- # tools-deps (61)
New #babashka release!
1.0.165 (2022-11-01)
• Fix https://github.com/babashka/babashka/issues/1401: mutation of deftype
field should be visible in protocol method
• Fix https://github.com/babashka/babashka/issues/1405: drop name metadata from conditionally defined var
• https://github.com/babashka/babashka/issues/602: add lib tests for clj-commons/fs (https://github.com/bobisageek)
• Add java.net.URLConnection
class
• Add java.time.zone.ZoneRules
class
• Copy more docstrings for core macros and vars
• Bump core.async
to 1.6.673
• Implement in-ns
as function, rather than special form (@SignSpice)
• Bump deps.clj
to 1.11.1.1182
• Bump GraalVM to 22.3.0
• SCI: don't rely on metadata for record implementation
I’m sure this has come up before but my search-fu is not yielding an answer. I have a ~/bb directory which is quickly amassing general purpose scripts (which I used to use bash or python for). Each script has an “(ns name-of-script …)” form at the start and the (when (= *file* ...
snippet at the end. I would like to reuse helper functions defined in these scripts, but for some reason I am not able to (require)
any scripts without first running (load-file "name-of-script.clj")
. I have a bb.edn
in there with {:paths ["."]}
but that doesn’t help. Any ideas?
It might help if you add the parent directory of the script to the classpath:
(babashka.classpath/add-classpath (str (fs/parent *file*)))
or you can treat your util functions as a library, by using (babashka.deps/add-deps '{:deps {utils/utils {:local/root "/Users/foo/bb/utils"}}})