This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-22
Channels
- # announcements (7)
- # babashka (17)
- # beginners (45)
- # biff (2)
- # cider (16)
- # clj-on-windows (3)
- # cljs-dev (12)
- # clojure (27)
- # clojure-austin (1)
- # clojure-europe (18)
- # clojure-norway (5)
- # clojurescript (36)
- # conjure (35)
- # core-async (2)
- # datascript (4)
- # datomic (4)
- # emacs (15)
- # fulcro (23)
- # holy-lambda (12)
- # hyperfiddle (1)
- # introduce-yourself (5)
- # nbb (11)
- # off-topic (37)
- # pathom (34)
- # pedestal (9)
- # reitit (4)
- # releases (1)
- # remote-jobs (1)
- # sci (5)
- # scittle (3)
- # shadow-cljs (88)
- # tools-build (4)
I'd like to enable clojure.core.reducers from babashka. My current understanding is that I'd have to do a custom build of babashka that includes the java.util.concurrent.ForkJoin*
classes the reducers library uses (https://github.com/clojure/clojure/blob/master/src/clj/clojure/core/reducers.clj). Is there anything I'm missing?
(This is because I'd like to use a library that depends on reducers: https://github.com/dco-dev/interval-tree)
Is clojure.core reducers crucial to that library? I only see one usage of it in core.clj - perhaps you can replace this usage with transducers in a reader conditional (or macro which dispatches on bb vs clj)
How does bb build classpath regarding
:deps {local/deps {:local/root "."}}
?
Example to reproduce:
1. Create an empty bb.edn file, and add the following
{:paths ["./"]
:deps {local/deps {:local/root "."}}}
Classpath is populated. (What’s the logic to add classpath?)
Also, if I change the above to
{:paths ["./"]
:deps {local/deps {:local/root "./"}}}
The bb errs with error building classpath.local/root scans a directory for a deps.edn file and those deps are added to the classpath
so in the dir specified by the :local/root
you could put a deps.edn with it's own :dir
pointed to, say, "."
or whatever else you wanted "src"
etc
interesting. i was trying something related last week and didn't get how that worked
> so in the dir specified by the :local/root
you could put a deps.edn with it’s own :dir
pointed to, say, "."
or whatever else you wanted "src"
etc
Are you saying the :paths
instead of :dir
?
> I recommend using just "."
and not "./"
(edited)
@U04V15CAJ I was saying
1. specifying “.”, and “./” have a different effect, though they shall be the same.
2. Further, even if there is no deps.edn under the current directory, specifying “.” still adds some deps. I am investigating where it comes from.
@U04V15CAJ A reproducible example on myside is:
mkdir test-bb; cd test-bb
echo "{:deps {local/deps {:local/root "."}}}" > bb.edn
bb
(require '[babashka.classpath :refer [get-classpath]])
(get-classpath)
A bunch of classpaths are showing up.
user=> (get-classpath)
"/Users/pinkfrog/files/dev/mine/bb/src:/Users/pinkfrog/files/dev/mine/bb/resources:/Users/pinkfrog/files/dev/mine/clj/src:/Users/pinkfrog/files/dev/mine/clj/resources:/Users/pinkfrog/.gitlibs/libs/org.babashka/spec.alpha/1a841c4cc1d4f6dab7505a98ed2d532dd9d56b78/src/main/java:/Users/pinkfrog/.gitlibs/libs/org.babashka/spec.alpha/1a841c4cc1d4f6dab7505a98ed2d532dd9d56b78/src/main/clojure:/Users/pinkfrog/.gitlibs/libs/org.babashka/spec.alpha/1a841c4cc1d4f6dab7505a98ed2d532dd9d56b78/src/main/resources:/Users/pinkfrog/.m2/repository/babashka/process/0.1.7/process-0.1.7.jar:/Users/pinkfrog/.m2/repository/cheshire,,,,
This one
/Users/pinkfrog/files/dev/mine/bb/src
Is one of my local repo. Dunno why it gets included.@U04V15CAJ I removed the ~/.config/clojure/.cpcache, and the issue has now gone.