Replies: 3 comments
-
|
Haven't had time to look into this just yet, but no I can't think of any
reason why babashka would work differently in and outside of conjure.
Conjure just runs babashka as a subprocess of Neovim in your current
working directory.
No other changes are made, it's as if we just run bb with an argument to
enable an nREPL server.
Maybe those default nREPL server options prevent bb from reading it's
config to load dependencies for some reason?
Or is your Neovim CWD in your home directory when you open the file? That
could cause this issue.
…On Mon, 10 Mar 2025, 11:41 Henrik Lindblom, ***@***.***> wrote:
I'm trying to discern what the support is for evaluating function calls
from libraries in Babashka with Conjure.
I've been following the quick start guides for Babashka
<https://book.babashka.org/#project-setup> and Conjure (Babashka)
<https://github.com/Olical/conjure/wiki/Quick-start:-Clojure-(babashka)>,
and my experience is that expressions and functions within the the local
namespace evaluate just fine, but If I try to evaluate a library function
like m/index-by in the following file.
; main.clj
(ns main
(:require [medley.core :as m]))
(defn -main [& _args]
(prn (m/index-by :id [{:id 1} {:id 2}])))
(-main)
I get this error message from the REPL
; (err) clojure.lang.ExceptionInfo: Could not resolve symbol: m/index-by main /home/helibom/dev/bb-demo/main.clj:1:1
Running clojure-lsp diagnostics results in "No diagnostics found!"
and running the script with bb main.clj yields the expected output {1
{:id 1}, 2 {:id 2}}.
My question:
Is it a known constraint that Conjure cannot fully evaluate Babashka code
with deps, or is there something wrong with my setup?
—
Reply to this email directly, view it on GitHub
<#655>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACM6XI2JWBAIY36GGVZX432TV24VAVCNFSM6AAAAABYV4LKJOVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGA3DAMZRGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Yo, I'm so sorry for wasting your time. I'm a total Clojure beginner and I didn't realize that of course I have to evaluate the namespace and dependency import before those things are available. How embarassing... 🙈 Regardless, thank you so much for your quick reply, @Olical. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Not a problem or a waste of time! Glad it worked out for you! :D
…On Mon, 10 Mar 2025, 15:52 Henrik Lindblom, ***@***.***> wrote:
Yo, I'm so sorry for wasting your time. I'm a total Clojure beginner and I
didn't realize that of course I have to evaluate the namespace and
dependency import before those things are available. How embarassing... 🙈
Regardless, thank you so much for your quick reply, @Olical
<https://github.com/Olical>.
Very appreaciative of this Neovim plugin and I'm sure it will be a joyful
tool in my Clojure journey!
—
Reply to this email directly, view it on GitHub
<#655 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACM6XJ4PI5VOPI7TORN2N32TWYNFAVCNFSM6AAAAABYV4LKJOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENBVGEZDEOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to discern what the support is for evaluating function calls from dependency libraries in Babashka with Conjure.
I've been following the quick start guides for Babashka and Conjure (Babashka), and my experience is that expressions and functions within the the local namespace evaluate just fine, but If I try to evaluate a library function like
m/index-byin the following file.I get this error message from the REPL
Running
clojure-lsp diagnosticsresults in"No diagnostics found!"and running the script with
bb main.cljyields the expected output{1 {:id 1}, 2 {:id 2}}.My question:
Is it a known constraint that Conjure cannot fully evaluate Babashka code with deps, or is there something wrong with my setup?
Beta Was this translation helpful? Give feedback.
All reactions