Fork me on GitHub
#cursive
<
2019-09-27
>
dmarjenburgh11:09:58

I’m trying to mark my test folder as Test Root, but it keeps getting unmarked when I re-open the project. I’m using a maven style project layout. As you can see, the src/test/clojure folder is not a test root which makes me unable to call Load file in REPL from my tests.

manutter5111:09:29

I had something like that once and I’m trying to remember the cause — I think it was the way I had source paths set up in my project.clj file?

dmarjenburgh11:09:35

I’m using deps.edn. The test path is added in a :unit-test alias. Maybe the alias must start with test or something

dmarjenburgh11:09:00

That’s actually it. Only if the alias is exactly equal to :test will it mark the added paths as test roots

sooheon12:09:49

Curious if anyone else is seeing this issue with jumping b/w test and impl? https://github.com/cursive-ide/cursive/issues/2235

cfleming22:09:15

@dmarjenburgh Yes, sadly deps doesn’t distinguish between source and test roots, so the only way to identify them is based on the alias name. I could probably do something like “Any alias containing ‘test[s]?’ as one of its segments” (like your :unit-test).

onetom02:09:15

would that be possible to retain manual directory markings between deps imports? that way the only heuristic would be to look for test[s] alias, but users can correct the initial import's decision manually with the mark directory as... action and subsequent imports should "just" honor those decisions.

dmarjenburgh06:09:22

I actually don’t necessarily expect Cursive to know my test dirs. I guess applying a one-off heuristic is fine, but after that I’m ok with manually assigning test roots, as long is it isn’t removed afterwards.

4
cfleming22:09:35

@sooheon.k No-one else has reported that, I’ll try to reproduce it next week.