Fork me on GitHub
#cursive
<
2020-09-21
>
cjmurphy15:09:16

Is "No nREPL ack received" still a problem. I have a Shadow nREPL server running and can connect to it using the command line. But starting the nREPL from Cursive I always get "No nREPL ack received".

cjmurphy15:09:21

The stack trace says the connection is being refused.

cfleming21:09:38

I can’t think of any reason why the connection should be refused from Cursive but not from the command line.

cjmurphy00:09:47

Could IntelliJ stop certain things from happening, swallow events/messages that it sees, when it knows is it resource constrained? I know I'm thinking of the weird and ridiculous, but that sometimes helps... I'll try on a smaller project...

cjmurphy01:09:09

So it works fine when my machine not 'taxed'. When I'm doing that form it is in colour! I'm not saying I've found the primary cause thou...

cjmurphy01:09:08

Luckily this time I got the failure I also got a Cursive crash. Sent you the exception report.

misha07:09:55

@U0D5RN0S1 in cursive run configuration, do you have nrepl port hardcoded, or "from nrepl file"? generally, shadow starts on new port every time:

misha07:09:13

just now, restarted 2 times within a minute:

shadow-cljs - nREPL server started on port 55773
shadow-cljs - nREPL server started on port 55785

misha07:09:56

and when port is hardcoded:

Could not connect to localhost:50892: Connection refused (Connection refused)

cjmurphy10:09:01

I don't known where to find that screenshot.

cjmurphy15:09:26

The nREPL server is always started on:

:nrepl  {:port 9000}
, from the shadow-cljs.edn file. And the Run/Debug Configurations thing that I've named nREPL is very standard. It has 'nREPL' checked and 'Run with Deps' checked. Perhaps multiple projects that get killed (or not) and all use port 9000 doesn't help. I certainly think that I've done clean state experiments. Perhaps it would be better if my projects never set an :nrepl :port ??

cfleming22:09:17

@U0D5RN0S1 Can you send a screenshot of your run config?

cfleming22:09:34

I’ve received reports of that exception, but I’ve never managed to reproduce it.

cjmurphy23:09:49

Sent you as a PM. There's nothing special about it and it is the same that others use.

cjmurphy00:09:33

Connecting to Shadow's existing nREPL is a revelation to me. Does it really mean my REPL/JVM will never be hosed?? I'll never have to wait for it coming up again. I should have picked up on this a long time ago.

cjmurphy08:09:01

For the UX one possibility would be to do away with local and remote all together. And have more explanation on the Run Configuration page, making it longer than a page. Also if you detect that there's an nrepl server running at 9000 and the REPL is not connecting to it then that's almost certainly a mis-configuration and the user should be alerted. It could be in red writing on that page.

cjmurphy08:09:58

Maybe make each possible situation that the user might want into a sentence and the user chooses one.

cjmurphy08:09:36

So "Full stack with Shadow-cljs" option might have a status of 'waiting for nREPL server to start listening at port 9000'. There would be a place to enter the port number (9000 only being a default).

Rachel Westmacott15:09:39

Does anyone have a fix for the following: I've set up a dev directory (with a user ns) in a deps.edn configured project. My REPL runs nicely with a :dev alias that I've added to include the dev directory in :extra-paths. It's all working great... except that the IDE has no idea about the dev directory, so editing code there is a real pita. I've tried Mark Directory As -> Sources Root and that absolutely solves the problem - but of course that gets periodically overridden (as it should) by the deps.edn configuration. Is there some way to make the IDE pick up an alias? I'm loathe to move the extra path out of the alias as we don't want that code in our finished artefacts.

Michael W16:09:34

If you edit your repl configuration, there is an option under "How to run it" called "Run with Deps". you can put your dev alias(es) there once you select the option.

Rachel Westmacott08:09:41

@UAB2NMK25 thanks - but I got that already

Rachel Westmacott08:09:37

@U0567Q30W that's it! perfect! best possible answer! In my defence I don't think that existed last time I read the docs.