cursive-ide / cursive

Cursive: The IDE for beautiful Clojure code
574 stars 7 forks source link

proper way to set up multimodule deps.edn with cursive? #2900

Open mping opened 2 months ago

mping commented 2 months ago

I have a multimodule project with deps.edn. Each module is its own module in idea, and the root module depends on every other module; it doesn't contain any sources.

However, when I start the REPL (either with intellij or via deps.edn classpath) and try to load a file from any module, I get the following error:

Cannot load instance_test.clj file into the active REPL. It is not in scope for the module used to start the REPL.

The same setup works with other projects. Obviously something is different, but it's very hard to pinpoint exactly the differences due to some custom tooling on top of deps.edn.

It would be useful to understand what is the proper way of setting up a multimodule project with cursive so a single REPL could load any file.

cursive-ide commented 1 month ago

When you run your REPL, do you have the root module selected as the context module? If you do, this should work.

mping commented 1 month ago

@cursive-ide Sorry I missed the notification; I do have the root module selected as the context module. However, sometimes, in some projects, it doesn't work. Another issue I have that may be related is that I have to set some test folders as "src" and not "test" folders for tests to be executed correctly.