Fork me on GitHub
#cursive
<
2020-08-15
>
Nick Cernis21:08:38

[SOLVED: thanks to salam for the help!] Should Cursive automatically load and run the Clojure hello world project from http://exercism.io without additional setup? If I “Run tests in current NS in REPL” from hello_world_test.clj I see Could not locate hello_world__init.class, hello_world.clj or hello_world.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name. (The docs suggest Cursive should load any dependent namespaces, and the hello-world-test ns requires the hello-world namespace.) If I send hello_world.clj to the REPL and then “run tests in current NS in REPL” from the test file I see Running tests in hello-world-test but tests never appear to complete and the forms are not annotated with test results as described in the https://cursive-ide.com/userguide/testing.html. Running lein test produces results as expected but obviously does not offer editor integration.

salam21:08:56

what’s the classpath you chose in the run configuration to start the repl?

Nick Cernis21:08:58

There was no option to select a classpath. I just picked “Start IDE repl” from the Tools menu.

salam21:08:16

“IDE repl” in Tools menu? i’m not sure what that is and how it’s configured.

salam21:08:00

yeah, that might be something excercism-specific.

salam21:08:49

can you try running the repl using a regular run configuration?

salam21:08:37

Control + Option + R and Edit Run Configurations.

thanks3 3
Nick Cernis21:08:26

It works! Thank you so much, that has been a big help.

👍 3
Nick Cernis22:08:32

It looks like there is a difference between an “IDE: User” REPL (which Tools → Start IDE REPL generates) and a “Local: User” REPL (which the run configuration starts). I'll dig into the Cursive docs to learn more…

👍 3
cfleming22:08:47

The IDE REPL isn’t documented - you need to have a property (`idea.is.internal=true`) set in order to see it. It opens a REPL on your open IDE instance, which is a totally different environment to your project. It’s mostly useful for me, at least at this stage.

Nick Cernis16:08:39

Ah, thank you @U0567Q30W — that explains it. I have the internal flag set to true for my own theme/plugin development and didn't realise it affected Cursive in that way.