This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-19
Channels
- # announcements (5)
- # beginners (40)
- # cider (3)
- # clara (7)
- # cljs-dev (2)
- # cljsrn (4)
- # clojure (13)
- # clojure-spec (24)
- # clojure-uk (4)
- # clojurescript (3)
- # cursive (6)
- # data-science (3)
- # datomic (53)
- # emacs (3)
- # figwheel-main (11)
- # fulcro (37)
- # lein-figwheel (17)
- # off-topic (13)
- # parinfer (1)
- # re-frame (9)
- # reagent (2)
- # remote-jobs (7)
- # shadow-cljs (75)
- # tools-deps (4)
- # yada (16)
Is it possible to test for reflection warnings? I was wondering if there is a pattern similar to this:
(deftest some-test
(binding [*warn-on-reflection* true]
(try
(testing "some test"
...
)
(catch ReflectionWarning _ ...))))
but even if testing at compile time, ReflectionWarnings don't get thrown do they?
what is a ReflectionWarning then? I assumed it was a warning message not something that gets thrown.
?? anyway regarding the initial thing in this thread, I found the source, this isn't something you can catch
ah... don't worry - Reflection warnings are compile time - so it doesn't make sense to test for them like this
when using deps.edn
how do I deal with a dependency which in Leiningen is handled like this:
[edu.stanford.nlp/stanford-corenlp "3.9.1"]
[edu.stanford.nlp/stanford-corenlp "3.9.1" :classifier "models"]
i.e. the same dep twice but one with :classifier "models"
:deps
in deps.edn
is a map
ok the trick is to add a map entry (any unique key will do) with a :local/root "/path/to/.m2/repository/edu/stanford/nlp/stanford-corenlp/3.9.1/stanford-corenlp-3.9.1-models.jar