This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-27
Channels
- # beginners (86)
- # calva (1)
- # cider (21)
- # clj-kondo (2)
- # clojure (31)
- # clojure-europe (3)
- # clojure-italy (7)
- # clojure-nl (7)
- # clojure-spec (15)
- # clojure-uk (70)
- # clojurescript (4)
- # clojutre (31)
- # code-reviews (6)
- # cursive (10)
- # datomic (8)
- # duct (3)
- # emacs (2)
- # fulcro (34)
- # funcool (3)
- # jackdaw (2)
- # jobs (10)
- # jvm (2)
- # kaocha (1)
- # off-topic (21)
- # pathom (11)
- # re-frame (10)
- # reagent (4)
- # schema (1)
- # shadow-cljs (72)
- # sql (1)
- # tools-deps (3)
- # vim (9)
- # xtdb (4)
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.
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?
I’m using deps.edn
. The test path is added in a :unit-test
alias. Maybe the alias must start with test
or something
That’s actually it. Only if the alias is exactly equal to :test
will it mark the added paths as test roots
:thumbsup:
Curious if anyone else is seeing this issue with jumping b/w test and impl? https://github.com/cursive-ide/cursive/issues/2235
@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
).
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.
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.
@sooheon.k No-one else has reported that, I’ll try to reproduce it next week.