-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deno repl #923
Comments
Currently there is no support for a CLJS REPL in deno since I have not implemented it yet. I have only played very briefly with deno when I created In essence there are 3 implemented REPL types currently. Browser, react-native and node
A deno CLJS REPL would need an implementation like these. They control how code actually connectes back to shadow-cljs and how code is loaded. You could attempt to write an implementation yourself and configure your build via I don't currently have time to work out how to do this in deno myself but I can answer questions here if you want to try yourself (or anyone else interested). If deno supports websockets the port should be straightforward. I'm unsure how it handles dynamic code loading but I believe |
I'm very interested in this feature and would like to at least tip my toes into contributing if that's OK. Skimming the code I got confused by how the node client implements eval. The function is defined in this text file here which is loaded here. This stuff is a bit over my head at this point without further exploration, pointers or explanation. Would it be feasible to just ignore the And as a bit of an aside: Happy to know if there are already any resources such as discussions/blog posts/documentation/videos and so on that give a bit of a high level overview of how shadow-cljs works internally, how I can think of the different parts and the REPL specifically. The things I found are more about the usage and less about how the thing works or how it is designed. |
An external deno implementation would be useful also as a guidance to implement the REPL for other runtimes, like gjs or bun. Specifically, gjs already has shadow-cljs support with an external target https://github.com/titonbarua/shadow-cljs-gjs-target and it also has a WebSocket implementation. It's only missing the code to run the REPL, |
I've successfully implemented the REPL for the gjs runtime. The code may help you get the REPL working on deno: https://github.com/ranfdev/shadow-cljs-gjs-target |
@thheller, thank you so much for creating shadow-cljs 👍👍 I hacked a bit on a prototype to create a shadow-cljs REPL for Deno: https://github.com/maxweber/cljs-deno-example It is working 🥳 I used these as starting points:
I couldn't use https://medium.com/deno-the-complete-reference/dynamic-imports-in-deno-5e9eb7f66238
The content of the |
I am trying to develop an application with clojurescript and deno. The trivial sources are here. It works great until I tried to run a repl.
To run the repl, I..
node_modules/.bin/shadow-cljs clj-repl
Result:
The underlying
deno
program exit and I have the following error.Expected:
The repl should switch to deno process.
My two cents..
I believe the stdin of the deno process is closed. If I manually
tail -f main.js | deno repl
it works.The text was updated successfully, but these errors were encountered: