Closed arichiardi closed 7 years ago
Yes I will need to add both to inf-clojure but it would be better not to have to require a namespace just for exposing one var.
The problem is that the form will be evaluated in a clj repl where the require will fail...I will need to parse the failed message as text, not fun.
Hence the need of this issue...If we can follow Clojure's convention that exposes it straight up at repl it is better and easier for inf-clojure.
What do you both folks think? Can we coordinate that?
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
That doesn't seem like a strong enough argument to me. You'll also get an error for an inexistent var if we auto refer, so I see absolutely no difference
True, it seems there should be a common way for clj, Lumo and Planck to advertise their "type". Unrepl would have that. I need to find something in order to sminolve this problem.
Maybe we could expose a *clojure-version*
that adds a key to the current major, minor, patch?
I don't understand what you mean. I strongly disagree with adding a *clojure-version*
var to Lumo
Related: mfikes/planck#466 and #111
Ok, fair. At this point it looks like it would be too much of an effort for me to drive this towards what inf-clojure
needs. Probably patching inf-clojure
would be easier, but I will try again.
What I need is basically a var, the name is not important here, that is present in all repls and describes the repl type.
Something so that I can do:
boot.user=> *repl-type*
"lumo"
The concept of a more generic :about
is also present in unrepl
, some sort of way to advertize what the repl is and what the capabilities are. Details here: https://github.com/cgrand/unrepl#unreplhello
I'm not in a rush to find a solution. I'm sure we can come up with something that satisfies every use case
I am in a bit more of a rush because now inf-clojure
fails badly :smile:
@arichiardi sorry, but if you want an immediate solution I'd encourage you to go with (do (require '[lumo.core :refer [*lumo-version*]]) *lumo-version*)
.
Otherwise I'm going to close this issue and track the progress in #111 .
Yep this feels like not the right solution anyways.
Hello Antonio!
So by working on
inf-clojure
I stumbled across an issue (https://github.com/clojure-emacs/inf-clojure/issues/79) where I'd a single-instruction, as less invasive as possible flag that signals that we are in alumo
repl. Bozhidar was suggesting something akin to*clojure-version*
.The problem is that (as per Slack conversation) at the moment I need to require
lumo.core
in order to achieve that:The above is fine, but deviates a bit from a normal clojure repl:
...where the var is exposed directly. In general it would be great if lumo could do the same, either moving
*lumo-version*
tolumo.repl
or auto-referring it.I am open to PR this one.