Use load-file op in monroe-load-file.#49
Conversation
Let's use the declarative version instead of just shooting Clojure code across the wire. Also remove reference to tramp-compat-file-local-name which doesn't appear to exist.
|
Oh dear; it appears the reference Clojure nrepl server has a broken |
|
OK so I just re-read the spec and it turns out the spec is ... reeeeeally weird:
https://nrepl.org/nrepl/ops.html#load-file Apparently it's the client's responsibility to read the whole file and send it across the wire? So the I honestly think this needs to be fixed in the spec; sending the whole contents of the file across the wire makes no sense. |
|
Thank you! cc @bbatsov: wasn't nREPL |
If I recall correctly |
|
See nrepl/nrepl@c27681c for details.
Indeed. Looking at the code this has always been the case. |
I think it still makes sense to have this as a top-level op! For example, maybe you want to load a file that you haven't opened in the editor, or maybe you want to load a file that's on the other side of the network boundary and your client can't access it. But the current parameter doesn't make sense. It should take the filename as a parameter and actually use that argument.
I think what you're saying is that the I would propose that the spec be updated to treat the current behavior as deprecated and recommend that But this is starting to go a bit off-topic. Should we continue the discussion in the nrepl issue tracker? |
Yeah, that would be best. |
|
I've got a new version of the spec here that addresses this: nrepl/spec.nrepl.org#1 @sanel as an nREPL implementer, your input on the spec would be appreciated. Depending on how that goes I'll update it here. |
Let's use the declarative version instead of just shooting Clojure code across the wire.
Also remove reference to tramp-compat-file-local-name which doesn't appear to exist.