This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-01
Channels
- # announcements (11)
- # babashka (21)
- # beginners (57)
- # biff (5)
- # calva (75)
- # clj-commons (20)
- # cljs-dev (27)
- # clojars (88)
- # clojure (18)
- # clojure-europe (11)
- # clojure-germany (1)
- # clojurescript (52)
- # datalevin (25)
- # emacs (2)
- # graphql (2)
- # gratitude (4)
- # off-topic (6)
- # pathom (16)
- # reagent (3)
- # releases (4)
- # shadow-cljs (7)
- # spacemacs (9)
- # transit (3)
- # xtdb (5)
question about babashka pods running on the JVM, why does this
(pods/load-pod 'retrogradeorbit/bootleg "0.1.9")
(require '[pod.retrogradeorbit.hickory.select :as s])
prints out warning below?
WARNING: class already refers to: #'clojure.core/class in namespace: pod.retrogradeorbit.hickory.select, being replaced by: #'pod.retrogradeorbit.hickory.select/class
WARNING: and already refers to: #'clojure.core/and in namespace: pod.retrogradeorbit.hickory.select, being replaced by: #'pod.retrogradeorbit.hickory.select/and
WARNING: or already refers to: #'clojure.core/or in namespace: pod.retrogradeorbit.hickory.select, being replaced by: #'pod.retrogradeorbit.hickory.select/or
WARNING: not already refers to: #'clojure.core/not in namespace: pod.retrogradeorbit.hickory.select, being replaced by: #'pod.retrogradeorbit.hickory.select/not
I thought it’s already not using :refer :all
? any way I can turn them off? so far nothing breaks, it’s just that this warning keeps showing that’s kinda get annoying after some timeIt's probably due to how pods in the JVM work. It defines vars using intern
.
user=> (intern 'user 'and 1)
WARNING: and already refers to: #'clojure.core/and in namespace: user, being replaced by: #'user/and
#'user/and
I'm not sure if there's a way to avoid these warnings, re-binding *out*
and *err*
don't seem to work. Perhaps calling ns-unmap first would work
ah, thanks for the explanation, I’ll make the issue first I guess. gonna do that later today
I have a question regarding how dependencies are managed between bb.edn and deps.edn. In one of my project I mix scripts runnable by babashka and scripts I run using clj. In order to manage the dependencies I use a single deps.edn and bb.edn references it using {:local/root "."} as described in the book. I added aero in the the deps.edn but I noticed that I could not require it in a babashka scripts unless I override the class path "-cp (clj -Spath)" or I declare the dependency in the bb.edn. Do I miss something?
@U805L34UX can you paste your bb.edn and deps.edn below? A common mistake is to not use a unique name for the local/root
actually I setup a sample repository and it works perfectly (https://github.com/mraveloarinjaka/bb_and_deps). I am going to see what is not working on the faulty project on Monday (at work). Thank you for your prompt reply.
@U805L34UX This is the problem:
{:deps {local/deps {:local/root "."}}}
Don't use the name local/deps
but use the unique name of your project, that people also would use when using your library as a dependencyif you re-use this local/deps
name across projects, you will get caching issues and the wrong dependency
across projects on the same machine?
I thought that dependencies were cached inside the project directory
ok so that is the explanation
yes, I already suspected that: https://clojurians.slack.com/archives/CLX41ASCS/p1680356873833539?thread_ts=1680356821.582389&cid=CLX41ASCS
I guess that is why you suggest to use a unique nickname in the book. Anyway thanks a lot for your help