This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-12
Channels
- # announcements (2)
- # bangalore-clj (4)
- # beginners (97)
- # calva (57)
- # cider (24)
- # clj-kondo (1)
- # cljdoc (4)
- # cljs-dev (8)
- # cljsrn (6)
- # clojure (27)
- # clojure-berlin (7)
- # clojure-dev (95)
- # clojure-europe (16)
- # clojure-italy (15)
- # clojure-losangeles (9)
- # clojure-nl (8)
- # clojure-spec (10)
- # clojure-uk (29)
- # clojurescript (25)
- # clojutre (2)
- # clr (6)
- # cursive (33)
- # datomic (20)
- # dirac (1)
- # duct (9)
- # fulcro (2)
- # graalvm (18)
- # jobs (5)
- # jobs-discuss (19)
- # nrepl (4)
- # nyc (1)
- # off-topic (18)
- # pathom (15)
- # re-frame (22)
- # reagent (4)
- # reitit (1)
- # rewrite-clj (9)
- # spacemacs (2)
- # xtdb (12)
@kenny Simple explanation, libhoney for some reason has the org.slf4j
class in its jar:
<sourceFolder url="file://$MODULE_DIR$/../../clojure/test" isTestSource="true" />
this isTestSource
setting in my module .iml
file is getting reset to false
after re-importing my deps.edn
.
the test support in cursive doesn't seem to work without marking the test directories as such.
is there a way to get around this?
can i somehow specify in my deps.edn
file that my test
directory is special?good point... i thought i was on the latest dev version, but im switching between a laptop and a desktop machine and one was on snapshot1 and the other was on snapshot2 i will try to repro the situation later today and report back
So in the old integration, if it came from an alias containing “test”, then the folder would be marked as a test folder. But I actually think I neglected to add that logic in the new integration - I’ll fix that tomorrow.
Regrettably deps doesn’t distinguish between source and test, so I’m left with something like that. If you have any other suggestions for how to identify test folders, let me know.
unfortunately im still flying a bit blind regarding tools deps, so no idea how should it work really.
i don't even know how can i check what is the combined effect of applying multiple aliases.
in the cursive Clojure Deps tool window i see a test (system)
alias, but i don't know where is it coming from.
it's not in some system deps.edn
file, because that doesn't exist.
there is a :test
alias in my ~/.clojure/deps.edn
but that's commented out.
sounds like it's something hard-coded, just like the default maven and clojars repos.
so im actually not sure whether should i shadow that system :test
alias with mine, because i don't even know what does it contain.
then i have no idea how cursive is using it.
does the test runner rely on it?
what's the effect of turning it out in the Clojure Deps tool window?
would it affect my Run with Deps REPL run configurations, which don't have any special options specified?
it's all very fuzzy to me. and i don't really expect answers, i just wanted to give you an idea what an average user like me is pondering over 🙂
There actually is a system deps file. If you’re on something unixy you can see where it is using -Sdescribe
. If you’re on windows, it’s currently bundled with Cursive but is also present in the tools.deps jar, and Cursive will shortly use that one for modern deps versions which contain it.
maybe some metadata extension like this could work and won't collide with future deps.edn
keys:
{:paths ^{:cursive/test-paths ["test"]}
["src" "test" "../data" "../rules"]
,,,}
similarly :java-source-paths
and :resource-paths
would be very welcome too.
i was missing them on my last project, where i had to use some autogenerated protobuf java sources and the classes
folder too
it also highlights the test sources in the project directory tree with a different color and the editor tabs if they are open, so you can distinguish them from the sources easier
Seems like that can be done for anything that is a deftest
.
The highlighting thing is nice, I suppose.
something didn't work when the test sources werent marked as test sources... can't remember what was it but i will report here when i can reproduce it
Cursive actually doesn’t care, IIRC - if there are things that don’t work it would be interesting to know so I can look at them. It’s possible that the test navigation uses it, in particular for deciding where to create a new test ns if it doesn’t exist.
I just tried to do Cmd-Shift-T to create a test for a new function I just wrote.
1. the Choose test for...
popup window appears
2. I can select the sole Create New Test...
menu item in it
3. a Choose destination
popup appears with a grey No matches found
message in the middle of it
but if I mark my test
dir to be Test Sources Root
, it actually jumps to the corresponding test file and creates a new deftest
form for me, which I really like!
Great feature, Colin; thanks!
Ok, thanks, I’ll check that out and see if I can make it work sensibly without test roots, and I’ll also fix the test root import.
I have it almost configured, but have a hard time doing this https://guide.clojure.style/#one-space-indent while still keeping 2 spaces for special forms