-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Clojure nREPL connection then eval race condition leads to broken REPL #396
Comments
The function takes a I think you'll just have to check the state of the client and inspect the REPL it's connected to if you want to know if you're still connected to the same one. Not planning on adding plugin-plugin support (plugins for Conjure as a first class thing), I'd rather they piggieback on what is already there or are added to the core through pull requests etc. Some core changes can be made to accommodate plugins but I don't plan on adding notification systems, hooks, extra APIs and deep internal documentation for every internal function (there's a LOT of code I've written over years and it changes, it'd be really hard to maintain that right now). You can also use this to see if there's a connection conjure/fnl/conjure/client/clojure/nrepl/server.fnl Lines 25 to 28 in 08236a1
Or inspect the state and get the current connection like so:
If you're going to be reaching into the internals of Conjure and poking things, might as well reach deeper and access the data you're interested in. It's all there, you have access to it, just have to dig through the code a little to see how I'm doing it. Shouldn't need anything extra added to accommodate further plugins (although I'd probably refer to them as mods since they're piggiebacking and modifying Conjure while it's running?). |
I already did what you described (unfortunately the Even the timer: The only problematic thing is that sometimes the test middleware fails to load and then I must restart the REPL as even the editor restarts don't help. That I can't understand yet. Also this timer loading mechanism sometimes produces multiple error messages when it fails to connect and I think it's somehow related to I'll try the |
I have developed a plugin that adds some middleware. But if I try to call
server.with-conn-and-ops-or-warn
then it doesn't crash when the REPL isn't connected. So the call either results in a NOOP or it succeeds. It's random.So I would like to have some kind of a way to know that it succeeded.
The callback would also be useful when Conjure decides to reconnect to a different REPL. It could notify the child plugins about it.
The alternative could be that I would try to brute-force that function until it "connects" but it's not a good thing to do.
The text was updated successfully, but these errors were encountered: