Fork me on GitHub
#cursive
<
2020-08-24
>
ikitommi08:08:03

I imported a shared (deps-based, via :local/root) library as a module into an existsing deps-project. It seems that the paths are not resolved correctly for that module if the paths are defined under a alias, e.g.

{:aliases {:backend {:extra-paths ["src/clj"]}}}
If I put all the paths into top :paths it works correctly.
{:paths ["src/clj" "resources"]}
How can I work with deps-modules with paths under aliases?

ikitommi14:08:48

Can’t figure out how to do that. In the Deps section I can see both modules, but only 1 set of aliases, which are from the main project. I don’t know how to enable :dev profile just for the added module.

ikitommi14:08:28

Deps looks like (`common`) is the module I imported, need to apply it’s :dev alias.

ikitommi14:08:16

setting the paths to top-level resolved the issue:

ikitommi14:08:37

this fails:

ikitommi14:08:52

and the actual the code is under src/clj.

ikitommi14:08:59

resolved: removing the src from sources makes it work. so, having src at top-level and src/clj under alias made it to fail.

cfleming00:08:20

Oh, so the problem is that src was present, but is not the actual source root - is that right? You don’t have code directly under src?

ikitommi03:08:59

no code directly under src directly, just subfolders clj, cljc and cljs with the actual sources.

Conor09:08:00

I'm having some trouble refreshing deps-based projects using Cursive - the error I get is 'Command failed when executing /usr/local/bin/clojure'. Going in to the settings, I can see it's pointing to that path but it seems like it can't correctly pick up the clojure executable there as it also has 'Command failed' just under it rather than the clojure version. I can run clojure using the terminal - what am I missing here?

cfleming11:08:13

Do you have anything in your log saying Output from <command> where command is probably /usr/local/bin/clojure? Help-&gt;Show log in Finder/Explorer/whatever

Conor11:08:35

#cursive.deps.DepsSettings - Output from /usr/local/bin/clojure -Sdescribe: Couldn't find 'java'. Please set JAVA_HOME.

Conor11:08:03

Oddly, I can now use Clojure directly and it appears to work OK

cfleming11:08:26

Do you mean use tools.deps directly?

Conor11:08:17

No, I switched to that temporarily, which worked. I mean that I can select the 'Use CLI tools' radio button and it now doesn't display the error

cfleming11:08:47

That is super weird, but I’ll take it 🙂

Conor11:08:00

I did a bunch of different things (installed tools.deps, installed lein via apt, restarted IntelliJ), so not sure which one was the winner. At least it works! 😄