Fork me on GitHub
#cursive
<
2021-07-20
>
cjmurphy06:07:17

Whenever I Refresh (two rounded arrows) Clojure Deps I lose all the directories that have previously been marked as source. Is there a way to make my intentions stick?

cfleming07:07:22

Yes, you need to ensure that they’re declared in your deps.edn file. Then they’ll be restored on every refresh.

cjmurphy07:07:58

Oh thanks, that makes sense. I'm experimenting with Polylith and there's a lot of 'declaring in your deps.edn file' required.

cfleming08:07:13

Oh, I see - I actually have a couple of improvements scheduled for the next release cycle which are for Polylith

👍 2
cjmurphy08:07:29

Like auto-adding source directories to the development (root level) deps.edn file perhaps? Every time a new component this needs to be done. The polylith tool could do this itself but for the moment it doesn't. Personally I wish it did. So if you add a new component called database (`clj -M:poly create component name:database`) make sure this string: "components/database/src" is in [:aliases :dev :extra-paths].

cfleming09:07:17

Hmm, I’m not sure about that - that sounds like it might be a change better placed in Polylith itself, the issue I’m looking at is https://github.com/cursive-ide/cursive/issues/2554. It sounds like it might be related, but I don’t understand polylith well enough to be sure. I haven’t used it myself.

cjmurphy10:07:55

I'm pretty sure he means 'not show up in blue' rather than 'not show up in green'. I think what's being said is that Cursive doesn't recognise extra-deps properly. It should be able to read from extra-deps and make the UI show the blue for the src directories.

cjmurphy10:07:41

Yes my wish is definitely for the Polylith tool. With Cursive as it currently is this would mean auto-adding to extra-paths. But with the Cursive bug fixed auto-adding to extra-deps instead.

cjmurphy10:07:31

(By the way a component is a brick).