cursive

Sam Adams 2025-03-08T23:53:13.530059Z

For deps projects, when an alias adds :extra-paths, how does Cursive decide whether to mark those paths as source or test roots? It seems to mark as source roots unless the alias name is :test?

cfleming 2025-03-09T00:02:42.867509Z

Yes, that's correct - it's really all Cursive can do by default, since deps has no concept of what is a test root. However, if that's not correct, you can manually override it by right clicking and selecting "Mark Directory as..." then choosing an option. That customisation will be stored with your project. This is also useful if you need to mark a source root as a resource root too.

imre 2025-03-09T14:17:13.329839Z

What's the significance of marking directories as source or resource btw?

cfleming 2025-03-09T18:44:12.833959Z

In my case, I use it because I need IntelliJ to know which is which, so when it's compiling it will copy resources to the output directories correctly. It's probably not such a useful distinction for Clojure-only projects.

👍 1
Sam Adams 2025-03-10T23:19:53.804199Z

Thanks for the clarification! IIRC, I would override Cursive’s inferred directory type via “Mark directory as”, but it would get reverted when I refreshed the deps project — although I’ll have to try reproducing to be sure. (My project used :dev as the testing alias.) Maybe the special :test alias behavior is worth mentioning on the deps page of the docs?

cfleming 2025-03-11T18:53:00.411289Z

No, it won't get reset, those customisations are persisted. I'll mention :test in the docs, though.