Fork me on GitHub
#calva
<
2019-12-13
>
johnjelinek00:12:46

hihi all, I'm using powershell core (`pwsh`/`pwsh-preview`) on macOS for my primary shell. calva won't start a REPL there: > > Executing task: clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.22.4"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" < > > clojure: The term 'clojure' is not recognized as the name of a cmdlet, function, script file, or operable program. > Check the spelling of the name, or if a path was included, verify that the path is correct and try again. > The terminal process terminated with exit code: 1 > > Terminal will be reused by tasks, press any key to close it.

johnjelinek00:12:31

oh ... I guess it's not pwsh-specific, I get that is zsh as well: > > Executing task: clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.22.4"}}}' -A:dev -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" < > > zsh:1: command not found: clojure > The terminal process terminated with exit code: 127 > > Terminal will be reused by tasks, press any key to close it.

johnjelinek00:12:10

ls -lah $(which clojure)

lrwxr-xr-x  1 44398  admin    40B Oct  2 18:01 /usr/local/bin/clojure -> ../Cellar/clojure/1.10.1.469/bin/clojure
it's installed though ☝️

johnjelinek00:12:07

oh ... weird, Reload Window had no effect on this, but closing the window and re-opening now results in this: > > Executing task: clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.22.4"}}}' -A:dev -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" < > > Error while parsing option "--config-data {:deps {nrepl {:mvn/version 0.6.0} cider/cider-nrepl {:mvn/version 0.22.4}}}": java.lang.NumberFormatException: Invalid number: 0.6.0 > The terminal process terminated with exit code: 1 > > Terminal will be reused by tasks, press any key to close it.

johnjelinek00:12:27

this is the error I was trying to address originally

johnjelinek01:12:43

this command works though: > clojure -Sdeps "{:deps {nrepl {:mvn/version """"0.6.0""""} cider/cider-nrepl {:mvn/version """"0.22.4""""}}}" -A:dev -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"

johnjelinek01:12:16

seems like maybe instead of checking for isWin you could determine which shell clojure is executing from: https://github.com/BetterThanTomorrow/calva/blob/master/src/nrepl/project-types.ts#L294

johnjelinek01:12:40

node sees shells here: > > node > > process.env.SHELL > '/usr/local/bin/pwsh-preview'

pez05:12:58

There is more to it than three shell, unfortunately. The whole task mechanism is special for Windows. Might work to use the same truck for other platforms, but I'm not sure. A very large portion of the Calva development time had been spent on powershell. The quoting is crazy, and far from was easy as ctafting a command line that works when manually. You are welcome to try to fix it, but prepare for a lot of work.

👍 4
pez09:12:28

I located the bug with autocompletion in the REPL window. Turns out I have put too much trust in the TypeScript compiler. I now must check the tsconfig and see how I can make it help me with not releasing code where I access no-longer-existing properties. Please help testing this VSIX which hopefully will turn into v2.0.71 leter today: https://3326-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.71-fix-repl-win-completion-519-22fbb520.vsix

agold12:12:46

@pez: Thanks for the quick turnaround. Unfortunately, I have no time to test the fix today, but I appreciate your responsiveness 🙂

pez12:12:04

Cool. I'm releasing it now, actually. I've been testing it for a few hours. Seems solid. Should be, since it is a very targeted fix, of something that could not work.

hoppy12:12:33

I've been on it a couple hrs - seems fine

pez13:12:40

I have some hope that should fix the last piece of the mess I introduced with the refactoring in .67.

pez13:12:27

That was quite important and enabling changes, and it would be quite nice to be able to start enjoying it, instead of this fire fighting. 😃

hoppy13:12:24

there are still some quirks in the history, but it was impossible to complain about while ^^^ was going on :face_with_cowboy_hat:

pez13:12:52

I saw someone else mention history skip issues. Can't find it right now, though...

pez13:12:47

It's also a bit beyond me why people insist in bringing things to the prompt, when there is an editor. 😃

hoppy13:12:38

if you'd sling clojure for a living, you'd understand .... 🤐

hoppy13:12:06

but I've been trying it your way more lately. Building the comment blocks are fine, but just ad-hoc stuff I still like being in the repl and having history

hoppy13:12:54

if I'm working on (foo ... ) a hundred lines back, being able to run it real quick again and again w/o moving is helpful.

pez13:12:18

I'm slinging more and more Clojure for food, actually.

hoppy13:12:42

I'm glad to hear that...

pez13:12:19

Still only open the prompt when you guys complain about something there. Haha.

pez13:12:41

I think there should be a way to create a prompt-like experience in the editor, as we have touch at, you and I, @hoppy. But exactly how still eludes me.

hoppy13:12:28

my teammate has been trying migrate from cursive hit/miss for a while now. First thing he did yesterday was eval something that made 10K rows from a db and tried to dump it in the repl, which made him sad.

hoppy13:12:52

that points me to some idea that says "hey I just got fed a lazy seq, so I'm going to do something reasonable with it". That could be extended to all data-structures, so if you eval'ed something that came back complex, you could turn that into something that could be interactively explored, vis reframe-10x

hoppy13:12:29

I'm pretty sure orchard has all those tools buried in it, because cider doesn't get it that sort of trouble. (It gets in to different trouble because of it, but hey)

hoppy13:12:26

something that popped out with a big fat explorer window would be ideal (at least for me). I still feel handcuffed in these tiny little tiled windows. If I'm drilling down into a fat nested map, I'm not wanting to do that inside a postage stamp.

hoppy13:12:48

maybe that needs to be an external app that shares nrepl, but gets cues from calva. I dunno.

pez14:12:45

An inspector would be fantastic.

adamfeldman16:12:47

Note: IIRC, REBL’s license previously disallowed commercial use unless you were a paying Datomic customer. I might’ve missed it before, but now it appears there is a second licensing option: subscribing to the REBL Patreon http://rebl.cognitect.com/

hoppy18:12:01

It has always been that way - AFAIK

👍 4
hoppy18:12:41

My problem has always been getting it to work - it has some Java-FX dependency that was giving me fits

pez16:12:03

That‘s an option for some. Here are instructions for using it with Calva: https://calva.readthedocs.io/en/latest/rebl.html

👍 4