nrepl

https://github.com/nrepl/nrepl || https://nrepl.org
bozhidar 2019-03-26T08:30:20.061100Z

@shen I’ve added some basic docs about the new transport here (https://nrepl.org/nrepl/design/transports.html#_edn_transport). I guess we should extend this with some of the things we’ve discussed yesterday about the differences in the request format.

shen 2019-03-26T08:47:40.061800Z

Definitely. I'm keen to do some consolidation-ish work, including documentation

shen 2019-03-26T08:47:55.062300Z

those flaky tests are really annoying too 😕

shen 2019-03-26T08:48:46.063400Z

something different: I was thinking about what's the potential role of clojure spec in all of this, if any

shen 2019-03-26T08:49:07.063900Z

especially given it won't be available in all the clojure versions we support

shen 2019-03-26T08:49:22.064300Z

It could work well as a validation middleware

bozhidar 2019-03-26T08:55:17.064800Z

I think we can run the specs only on the version that we support. That shouldn’t be a big deal.

bozhidar 2019-03-26T08:55:25.065Z

> those flaky tests are really annoying too 😕

bozhidar 2019-03-26T08:55:49.065600Z

@cichli told me he was pretty busy lately, but he hoped he’d have some time for OSS this week. Fingers crossed.

bozhidar 2019-03-26T08:56:15.066100Z

> Definitely. I’m keen to do some consolidation-ish work, including documentation

bozhidar 2019-03-26T08:56:18.066300Z

Fantastic!

bozhidar 2019-03-26T08:57:08.067100Z

I spoke with the author of Calva and he said he’ll play with the new transport when he gets the chance.

shen 2019-03-26T09:21:36.068100Z

I'm not sure when last did someone check fastlane. It's definitely broken against master

shen 2019-03-26T09:21:51.068600Z

I think I tried it against 0.6.0, and that didn't work either

bozhidar 2019-03-26T09:50:43.069400Z

Really? It certainly worked in 0.5. Guess we messed something up. Would you please file a ticket with fastlane, so we won’t forget about fixing this?

shen 2019-03-26T10:06:46.069900Z

Will do.

shen 2019-03-26T10:07:57.070600Z

do you consider fastlane to be part of nrepl?

shen 2019-03-26T10:08:18.071200Z

(i.e. should nrepl always be tested against fastlane?)

shen 2019-03-26T10:08:44.071800Z

I know it's not part of the artifact because of transit related reasons

bozhidar 2019-03-26T10:23:39.072300Z

Yeah, I do. All projects in the nREPL org are considered official and should always work.

bozhidar 2019-03-26T10:24:44.073600Z

Piggieback is the most important one, and drawbridge also has quite a few users. fastlane is rather new, and doesn’t have much (any?) usage yet, but I hope this will change.

shen 2019-03-26T10:34:31.074400Z

I meant is there some expectation that nrepl master always works against a set of fastlane versions?

shen 2019-03-26T10:35:02.075Z

there's no matrix to speak of right now

bozhidar 2019-03-26T11:04:56.076100Z

There’s the expectation that it should work with the latest released version, and ideally with the master as well, but that’s not a hard requirement.

shen 2019-03-26T15:18:52.076600Z

Ok.

dpsutton 2019-03-26T15:19:24.077400Z

how can i start testing the new edn transport at work? any easy way to set an option in CIDER or something?

shen 2019-03-26T15:19:58.077700Z

Same question for all the first party transports I guess (drawbridge + ??)

dpsutton 2019-03-26T15:20:47.078700Z

and do changes in nrepl require a new lein based on that version?

shen 2019-03-26T15:21:19.079400Z

depends on what you want to do/test

shen 2019-03-26T15:22:19.080300Z

if you just want to have it up and running, grab nrepl master and follow this https://nrepl.org/nrepl/0.6.0/hacking_on_nrepl.html

shen 2019-03-26T15:23:21.081600Z

there's no clients (other than the one in nrepl) to test with. cider.el probably won't switch to EDN as bencode is easier

dpsutton 2019-03-26T15:23:30.082100Z

i thought i saw that nrepl is now 0.7-snapshot. lein requires 0.6 i thought

shen 2019-03-26T15:23:31.082200Z

so first native client is probably going to be some cljs/js one

shen 2019-03-26T15:24:07.082400Z

ah-ha, I see: https://clojars.org/nrepl/versions/0.7.0-SNAPSHOT

shen 2019-03-26T15:27:05.083600Z

I haven't tried it. I'd guess to get a server running with lein, it's a matter of requiring 0.7.0-SNAPSHOT as a dependency, and specifying the transport in :repl-options

bozhidar 2019-03-26T15:35:47.083900Z

Yep. Or nrepl.edn, as lein respects it.

bozhidar 2019-03-26T15:36:21.084300Z

We’ll bump the lein dep once we release 0.7 final.

dpsutton 2019-03-26T15:40:14.084500Z

👍

bozhidar 2019-03-26T15:41:12.084800Z

> there’s no clients (other than the one in nrepl) to test with. cider.el probably won’t switch to EDN as bencode is easier

bozhidar 2019-03-26T15:42:35.086100Z

Yeah, CIDER will likely never switch to an EDN transport.

bozhidar 2019-03-26T15:43:49.086700Z

That mostly depends on the maturity of the Elisp EDN parser, though.

bozhidar 2019-03-26T15:44:21.087200Z

I just realized that we’ll have to support the EDN transport for things like rich printing in the REPL.

shen 2019-03-26T15:53:19.087500Z

I just tried nprel.edn

shen 2019-03-26T15:53:42.087600Z

shen 2019-03-26T15:54:37.088400Z

but that seems to still start the bencode transport?

bozhidar 2019-03-26T15:55:00.088800Z

Are you sure?

shen 2019-03-26T15:56:50.089500Z

it is :transport and not :transport-fn, right?

dpsutton 2019-03-26T15:57:27.089800Z

(server/start-server
                      :transport-fn transport-fn
                      :handler (ack/handle-ack (server/default-handler)))

dpsutton 2019-03-26T15:58:03.090600Z

i got my form from nrepl.cmdline-test

bozhidar 2019-03-26T15:58:29.091300Z

Yeah, the server key is transport-fn, but I think it’s transport in the config.

dpsutton 2019-03-26T15:58:35.091600Z

ah apologies

shen 2019-03-26T15:58:46.091900Z

(fwiw, I'm trying to run it from lein repl, but with the 0.7.0-SNAPSHOT dependency. shouldn't that work?)

bozhidar 2019-03-26T15:59:36.092900Z

Try it with clj first, I might have made some silly mistake in lein, although I’m pretty sure I tested it with other transports.

shen 2019-03-26T16:06:31.093200Z

(almost) works as expected if I run with clj

shen 2019-03-26T16:06:39.093500Z

spotted a bug...

shen 2019-03-26T16:08:31.093800Z

but it only affected command line info output

shen 2019-03-26T16:09:57.093900Z

this is one of the WIP PRs?

shen 2019-03-26T16:25:52.094500Z

but this is not the issue with lein

bozhidar 2019-03-26T17:05:34.095100Z

I think in Lein we use the same function, right?

cfleming 2019-03-26T20:53:04.095700Z

In the latest Cursive, I’ve upgraded the nREPL used internally to nrepl:nrepl:0.6.0.

cfleming 2019-03-26T20:54:13.096700Z

I have a user with a CLJS project using Leiningen who’s reporting that under this version his app breaks at startup, with an error like this:

Exception in thread "main" java.lang.RuntimeException: No such var: nrepl.transport/uri-scheme, compiling:(/private/var/folders/fw/gd1yg_sd5sx_dvqv5pnk6f3m0000gn/T/form-init4758704793550975827.clj:1:3327)
    at clojure.lang.Compiler.analyze(Compiler.java:6792)
    at clojure.lang.Compiler.analyze(Compiler.java:6729)

cfleming 2019-03-26T20:54:40.097400Z

Cursive doesn’t use that var at all, and I’m awaiting details on what his stack looks like. But does that look familiar to anyone?

cfleming 2019-03-26T20:55:06.097900Z

I assume it’s a conflict between the new nREPL and piggieback or something similar.

cfleming 2019-03-26T20:56:47.098400Z

The var that’s required but missing is in the new nREPL namespace though, strangely.

cfleming 2019-03-26T23:16:27.099100Z

Actually, I suspect that this might be a lein version incompatibility, and the nREPL upgrade is a red herring. I’m waiting for feedback to confirm that.