Closed mrichards42 closed 5 years ago
Isn’t it easier for you to just upgrade the remote REPL?
Yeah... I wonder if it'd be useful to print both the local & remote versions. Seems like info about a version number mismatch could be valuable in the future if there were ever breaking changes.
Don't you normally care only about the version of the REPL you're connected to?
It's fine by me if reply doesn't want to support connecting to a remote repl with a different nrepl version than the client, and I don't mind this PR being closed. It seemed like a small enough change to be worth thinking about, especially since the only problem is in the purely informational prelude.
I agree though that the remote repl and clojure version are the important things to print, and it's possible that future nrepl version differences might be great enough that it doesn't make sense to even try connecting if the remote repl version is different enough.
I think you missed my point - I was wondering if there's ever a case when we care about the version of nREPL bundled with REPLy. After you all you always have to connect to nREPL, even if you spin it from REPLy. In the end of the day the remote version is that one that counts. Your suggestion would return a version that's misleading (as you won't actually be interaction with nREPL of that version), that's why I'm not sure that's a good idea.
No, I follow. I agree that the important information is the remote nREPL version, and I at this point I agree that the fix suggested in this PR is not the right approach.
It could make sense to wrap the prelude in a try-catch since it's just printing information. But since this problem is only going to affect the one-time switch from tools.nrepl
to nrepl
, it's not a big deal to me.
If I try to connect to a remote nREPL that uses the old tools.nrepl instead of the new nrepl, I get the following exception:
This PR fixes the exception by resolving the nREPL version locally instead of in the remote repl.