I’m curious - why does the sideloading require a sideloader-start message? Why not just call sideloader-lookup as required? Is that so that the client has to specifically acknowledge that it’s sideloader-capable?
greetings. I'm a bit vexxed/overwhelmed by the myriad of docs on the subject, so perhaps I'll ask if there is somebody that can point me at what would be the most straightforward path to getting an nrepl server fired up from node on an embedded device? I have node there, but no java - seems like it should be possible, but I'm having trouble how to assemble the parts. Shadow is in play, if that matters. I guess I'm wanting to get a cljs repl fired up there, and do the piggieback bit on the desktop to get into it.
To enable sideloading for a session explicitly, as the assumption is most people don't need it. With the sideloading enabled some evaluation of a missing require won't give you an error until you get a response from the client with the resource or signaling the resource doesn't exist.
@hoppy if you don't have Java there you can't really start the reference nREPL implementation and would ideally need some self-hosted implementation of nREPL.
I guess this one would work https://github.com/djblue/nrepl-cljs although it's not exactly feature-complete.
Does it mean Calva doesn't really need to inject anything but nrepl and can sideload anything else?
@flowthing Why do you need a dedicated nREPL session for sideloading?
I forget the specifics, and it appears they’re lost in the mists of Slack history, unfortunately… @shen would be able to tell. IIRC, if you try using the session where you send sideloader-start
for other things (like clojure.test integration), you’ll get sideloader-provide
requests for things you don’t want them for. That’s pretty much the extent of what I remember.
Yeah, that makes sense - I guess any time someone tries to require anything, even speculatively, it’ll go back to the IDE for that.
Assuming it’s not found locally, of course.
Yep, exactly.
There's quite a lot of non-obvious side effects to enabling sideloading, so isolating it in its own explicit session made sense. The design is based on unrepl version of the of the feature by Christophe. I assume it was made for similar reasons
^ That was re: > @bozhidar How does that work, then? I’m not sure how this should work from either a client implementation or a user UI point of view
Now I have read the rest of the convo, so never mind me. 😃
Yes, that’s why it was created, I think. That’s what I do in my plugin (although I don’t sideload CIDER or anything huge like that).
I think I mostly had those huge things in mind.
Well, it should work there, too.
Could be worth considering for the stuff that only might be used during a session.
https://metaredux.com/posts/2020/03/28/nrepl-0-7.html I found this blog post helpful when working on my implementation.
One thing I got bitten by was that you’ll need to use a dedicated nREPL session for sideloading.
Thanks. I'll check it out.
and then there is the work that sir @mfikes did with his esp32 board: https://github.com/mfikes/esprit - there is obviously not java anywhere to be found anywhere there, but rather something javascript-y that can eval the compiler output that was made on the desktop side - or I'm not understanding what is going on at all. But it seems pretty cool/useful