Comments (9)
FYI this works ( you might want to add to the readme at some point )
With a ~/.lein/profiles.clj
of :
{:repl { :repl-options { :init (clojure.core.server/start-server {:accept 'clojure.core.server/io-prepl :address "localhost" :port 55555 :name "lein"})} } }
and conjure.edn
of
{:conns { :lein {:port 55555 }}}
makes conjure evals ( connected to 55555 in this case) to be available in the lein nrepl.
from conjure.
Yep, the tool you use to start your program doesn't matter, prepl support is tied to Clojure, not the CLI.
You'll just have to start the prepl from your code like I show in my prepl cookbook post: https://oli.me.uk/2019-03-22-clojure-socket-prepl-cookbook/#from_your_code
If you know how to set JVM args with leiningen, then you will be able to start a prepl by defining the following flag.
-Dclojure.server.myprepl="{:port 5555 :accept clojure.core.server/io-prepl}"
There's not much to it 😄 I hope this helps!
from conjure.
I didn't really read the issue properly, I was a little distracted. My comment is still valid, but to elaborate on that: You can't connect to a lein repl because that's an nREPL server, not a socket prepl. The post I linked will show you how to start a socket prepl.
from conjure.
Thanks for the additional information.
When I add:
{repl: {:jvm-opts ["-Dclojure.server.myprepl=\"{:port 55555 :accept clojure.core.server/io-prepl}\""] }}
to profiles.clj
I get:
lein repl
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.(main.java:20)
Caused by: java.lang.ClassCastException: class java.lang.Character cannot be cast to class java.util.Map$Entry (java.lang.Character and java.util.Map$Entry are in module java.base of loader 'bootstrap')
at clojure.lang.APersistentMap.cons(APersistentMap.java:42)
at clojure.lang.RT.conj(RT.java:673)
at clojure.core$conj__5375.invokeStatic(core.clj:85)
at clojure.core$merge$fn__5943.invoke(core.clj:3049)
at clojure.core$reduce1.invokeStatic(core.clj:944)
at clojure.core$reduce1.invokeStatic(core.clj:934)
at clojure.core$merge.invokeStatic(core.clj:3048)
at clojure.core.server$parse_props$fn__8892.invoke(server.clj:152)
at clojure.core.protocols$naive_seq_reduce.invokeStatic(protocols.clj:62)
at clojure.core.protocols$interface_or_naive_reduce.invokeStatic(protocols.clj:72)
at clojure.core.protocols$fn__8144.invokeStatic(protocols.clj:169)
at clojure.core.protocols$fn__8144.invoke(protocols.clj:124)
at clojure.core.protocols$fn__8099$G__8094__8108.invoke(protocols.clj:19)
at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
at clojure.core.protocols$fn__8121.invokeStatic(protocols.clj:75)
at clojure.core.protocols$fn__8121.invoke(protocols.clj:75)
at clojure.core.protocols$fn__8073$G__8068__8086.invoke(protocols.clj:13)
at clojure.core$reduce.invokeStatic(core.clj:6828)
at clojure.core.server$parse_props.invokeStatic(server.clj:146)
at clojure.core.server$start_servers.invokeStatic(server.clj:157)
at clojure.core.server$start_servers.invoke(server.clj:157)
at clojure.lang.Var.invoke(Var.java:384)
at clojure.lang.RT.doInit(RT.java:492)
at clojure.lang.RT.(RT.java:338)
... 1 more
Subprocess failed
Ant ideas ?
from conjure.
Hmm, not sure right now but that repl:
doesn't look quite right to me. Maybe :repl
?
from conjure.
Glad you got it working! I'll bear this in mind, could add it to my socket prepl cookbook post too.
from conjure.
from conjure.
would be good if there was a way of getting the port number from profiles.clj
in conjure.edn
like you can for a single port value in a file.
from conjure.
Hmm, if it's in the profiles.clj
file it's a known value though, it's static. So you can just set that in your .conjure.edn
anyway, the slurping only really exists for random ports that are spat out into a file by convention.
I'd rather not introduce any more mechanisms if I can help it, static files where you can read more EDN should be enough for almost every case. I think.
from conjure.
Related Issues (20)
- [Clojure] Defining custom/alternative test runner HOT 5
- Regression on the `develop` branch since 5119706fa08ecb1efa72fb9d6e68bb965d259015 HOT 3
- Other floating windows overlap HUD HOT 1
- How can I write a conjure client without aniseed? HOT 5
- How do I connect to a Fennel REPL via port? HOT 3
- Connection resets upon evaluation on Windows for Janet + Netrepl HOT 4
- Disable all default mappings? HOT 11
- [Feature Request] Add Tangerine support (Fennel)
- Duplicate kondo messages with Lazy and your provided config HOT 7
- Randomly losing keymaps HOT 1
- Clojure: evaluate word misinterprets single-quotes in symbol names HOT 6
- [Clojure]: A way to configure a default namespace HOT 6
- Swap `__name__` to something other than `__main__` in Python REPLs HOT 3
- README Suggestion HOT 2
- Cannot connect to Scheme through socket HOT 2
- Async/await doesn't work with ipython REPL HOT 13
- stdio repl handling of both stderr and stdout for a form can be a problem sometimes HOT 1
- <localleader>ee, <localleader>E evaluate the whole file HOT 9
- Problems with evaluation: wrong returns HOT 3
- Guile over nREPL, guile-ares-rs integration HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conjure.