This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-25
Channels
- # aleph (9)
- # announcements (2)
- # babashka (32)
- # babashka-sci-dev (72)
- # beginners (77)
- # calva (1)
- # cider (3)
- # clj-kondo (19)
- # clojure (61)
- # clojure-brasil (13)
- # clojure-europe (25)
- # clojure-italy (1)
- # clojure-nl (2)
- # clojure-norway (27)
- # clojure-uk (23)
- # clojuredesign-podcast (6)
- # clojurescript (12)
- # conjure (2)
- # core-typed (3)
- # cursive (6)
- # datalevin (2)
- # datomic (13)
- # emacs (9)
- # events (19)
- # fulcro (6)
- # graphql (11)
- # gratitude (2)
- # helix (3)
- # honeysql (16)
- # jobs (1)
- # lsp (89)
- # malli (33)
- # meander (14)
- # off-topic (87)
- # pathom (4)
- # polylith (7)
- # portal (4)
- # practicalli (1)
- # rdf (6)
- # reagent (2)
- # releases (8)
- # remote-jobs (1)
- # shadow-cljs (59)
- # sql (8)
- # tools-deps (14)
- # xtdb (18)
Hello. I’ve got a problem with at-at
How to fix Method cancel on class java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask not allowed!
?
Hello! I've a problem with tasks and dependencies:
{:tasks
{-dep-1 (println "dep-1")
-dep-2 (println "dep-2")
-dep-3 {:depends [-dep-1]
:task (println "dep-3")}
-dep-4 {:depends [-dep-2]
:task (println "dep-4")}
-dep-5 {:depends [-dep-3]}
main {:depends [-dep-3 -dep-4]
:task (run '-dep-5)}}}
And the output when bb main
is run:
$ bb main
dep-1
dep-3
dep-2
dep-4
dep-1
dep-3
How can I avoid re-run of dep-1 and dep-3?that kinda makes sense to me. you said it explicitly depends on dep 3, and then dep 5 itself knows it depends on dep 3.
Is it possible to dynamically remove deps from the classpath? Or change their version?
I thought about using babashka to test for breaking changes between versions of a lib
load deps version 1
create db in memory
write to db
unload version 1
load version 2
read from db
But of course you could start a new bb process with a fixed classpath from within bb itself
Ok... I'll try that. But:
(deps/clojure (list* "-M" "-e" "(+ 1 2)"))
; or
(process/process ["clj" "-M" "-e" "(+ 1 2)"])
both return:
; : Multiple methods in multimethod 'simple-dispatch' match dispatch value: class babashka.process.Process -> interface clojure.lang.IDeref and interface clojure.lang.IPersistentMap, and neither is preferred user
Am I doing something wrong?@dpsutton I think I used a wrong way to express my problem, let me try it again 😛 I have a few tasks, like my final tasks is a
(do
(run 'task1)
(run 'task2)
(run 'task3))
And all of them require a few common stage setting tasks. so they interdepends on a few common depends. I want to be able to only run those common deps for only once. but when I have the above structure, task1 would run common depends once and so does the run of task2 and task3.
Is there any way to avoid that?Is this something achievable in bb? Or some way to structure the depends and tasks I shall use to solve it?
@lin.subscriber I would define a task that depends on task 1, task 2 and task 3 and then run that task. This will achieve that goal:
main {:depends [task1 task2 task3]}
If you want a dependency to run only once over multiple run
invocations then you should code something e.g. using a delay
I tried a few different ways, the issue I run into seems to be
I'm not sure how to share a variable that's defined in one particular task run
to be carried to the next task run
, it seems the [:tasks :init]
would re-run and the previously defined variables / keys are cleared.
@lin.subscriber Ah clear, yes. If you want to do this, you should make a separate namespace and put your code there. That namespace will be loaded only once
Babashka + Clojure event at https://www.meetup.com/novalug/ with @rahul080327 https://www.meetup.com/novalug/events/fzklrsydcgbmb/