This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-14
Channels
- # aleph (3)
- # announcements (1)
- # babashka (36)
- # babashka-sci-dev (4)
- # beginners (62)
- # biff (2)
- # calva (13)
- # cider (4)
- # clj-kondo (6)
- # cljdoc (17)
- # clojure (142)
- # clojure-dev (6)
- # clojure-europe (62)
- # clojurescript (20)
- # core-async (26)
- # cursive (18)
- # data-oriented-programming (9)
- # data-science (1)
- # datahike (18)
- # events (4)
- # fulcro (4)
- # graalvm (2)
- # hyperfiddle (15)
- # interop (1)
- # jobs-discuss (8)
- # leiningen (2)
- # lsp (91)
- # malli (1)
- # missionary (11)
- # nbb (65)
- # off-topic (50)
- # practicalli (2)
- # programming-beginners (4)
- # re-frame (18)
- # remote-jobs (1)
- # shadow-cljs (53)
- # spacemacs (1)
- # specter (2)
- # sql (17)
- # tools-build (63)
- # web-security (1)
- # xtdb (15)
When using bb pods, I noticed a lot of files are created and not removed. The specific pod is epiccastle/spire.
This port file should in theory be cleaned up by spire itself: https://github.com/epiccastle/spire/blob/76dcfcfad2628bb7da64ba85c2dd7e37145d4e04/src/clj/spire/pod/core.clj#L106
should work I think, but imo this is a bug in spire. can you check if the spire process also died?
Seems clojure.core/Inst is not available in bb? I have a file containing this
(extend-protocol clojure.core/Inst
Duration
(inst-ms* [v] (.toMillis ^Duration v))
OffsetDateTime
(inst-ms* [v] (.toEpochMilli (.toInstant ^OffsetDateTime v))))
and when being required, bb errs with
; Evaluation of file foo.clj failed: class
Here is the one: https://github.com/pinkfrog9/example-bb/tree/main
right. I think extending this protocol isn't supported at the moment. please file an issue if this is important to you
but adding it isn't as simple as just adding it somewhere. it can be supported though, but takes some effort
Take your time. I opened the issue: https://github.com/babashka/babashka/issues/1321
Note -- I just replied to your message in #clojure 🙂 https://clojurians.slack.com/archives/C03S1KBA2/p1657810440268079?thread_ts=1657810388.412779&cid=C03S1KBA2
Is it possible to provide a different mechanism for bb to list all tasks. Currently it seems bb will load all the required cljs files. which makes the a non-neglibile time for shell completion.
It indeed will not execute any functions, but it will load the related clj namespaces, which also takes time.
@UGC0NEP4Y i have code like:
src
└── foo
└── bar.clj
bar.clj:
(ns foo.bar)
(println "Printing from ns: Foo")
and bb.edn:
{:paths ["src"]
:tasks {:requires ([foo.bar :as bar])
foo (println 42)}}
You can see Printing from ns: Foo
only when doing bb foo
or bb run foo
not bb tasks
which the shell completion uses. Is this what you were trying?for me the completion time is pretty much the same as bb's startup time, so its expected i guess.
@U7ERLH6JX can you also try some code in :init?
{:paths ["src"]
:tasks {:init (println "Called from Init")
:requires ([foo.bar :as bar])
foo (println 42)}}
result
$ bb foo
Printing from ns: Foo
Called from Init
42
$ bb tasks
The following tasks are available:
foo
yeah i think so too