This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-16
Channels
- # announcements (2)
- # asami (124)
- # babashka (30)
- # babashka-sci-dev (73)
- # beginners (40)
- # biff (1)
- # calva (39)
- # clj-kondo (54)
- # clj-otel (1)
- # cljdoc (59)
- # cljs-dev (8)
- # clojars (2)
- # clojure (96)
- # clojure-austin (16)
- # clojure-boston (6)
- # clojure-europe (51)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-russia (60)
- # clojure-uk (4)
- # clojurescript (34)
- # community-development (6)
- # cursive (2)
- # datahike (10)
- # datascript (18)
- # emacs (109)
- # etaoin (1)
- # events (3)
- # figwheel-main (41)
- # fulcro (13)
- # helix (4)
- # introduce-yourself (5)
- # jobs (1)
- # leiningen (5)
- # lsp (8)
- # malli (6)
- # meander (7)
- # nrepl (6)
- # off-topic (60)
- # pathom (29)
- # polylith (8)
- # re-frame (5)
- # reitit (1)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (33)
- # sci (3)
- # shadow-cljs (3)
- # xtdb (82)
@borkdude Making an uberjar solved the problem!
Another question: I use emacs with CIDER to connect to the remote machine's bb nREPL server. I fire up the nREPL conventionally like bb nrepl-server 1667
and would like to continue with my development (with the medley dependency) loaded into the REPL session. It seems to me that it is not so straight forward to load the jar in the REPL. Hot-loading *.clj files where the medley dependency is used in my emacs cider session still throws the missing dependency issue. Is there a way to make the nREPL server to load an uberjar? As per my limited knowledge, one can connect to a running clojure application's nREPL server (which I honestly have not reached yet to do 😄).
@mukundzare Yes, you can do that :)
(babashka.classpath/add-classpath "deps/medley.jar")
This seems to not work for me somehow. I made the repl connection by using the --classpath however.
FileNotFoundException
wait a sec
let me paste the folder structure
last_restart.clj is where I define the classpath using add-classpath
if you start bb from the directory where bb.edn resides, you should be able to do (babashka.classpath/add-classpath "deps/medley.jar")
that worked!
either I could use --classpath and call bb from anywhere OR call bb from the place where bb.edn exists
thanks again!
Does this mean that I can add this dynamic classpath to let's say my main.clj
and then add the (require '[medley.core :as m]
statement form and don't bother with a uberjar?
niiiiccceee
let me try that
Running a #babashka website on http://fly.io! https://github.com/babashka/babashka/tree/master/doc/fly_io
@borkdude: do you think we can add some parameters to bb tasks
command ?
I would like to add --format
parameter to list tasks in different formats (simple and edn).
the end goal is to improve this part:
;; Type bb tasks to see all tasks
;; Type bb <task-name> or bb run <task-name> to run a task
{:min-bb-version "0.7.4"
:tasks {:requires ([clojure.string :as str])
app {:doc "Without arguments, prints tasks in app - with arguments, invokes task in app dir"
:task (if (empty? *command-line-args*)
(shell {:dir "projects/app"} "bb tasks")
(shell {:dir "projects/app"}
(str "bb run " (str/join " " *command-line-args*))))}}}
so I can list all tasks in a directory and print them with the prefix.also, it would be cool if I could intercept task execution and choose if I want to run the task or do something else. Trying to figure out how can I call tasks in different directories from a central place
@U011NGC5FFY The bb.edn
is already EDN so why would you need EDN output? :)
is there a way to register tasks via a function call. Wondering if I can read tasks from a bb edn and register them via a function
I think there is a related thing here: https://github.com/babashka/babashka/issues/1219