This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-20
Channels
- # announcements (1)
- # babashka (74)
- # beginners (84)
- # bristol-clojurians (3)
- # cider (2)
- # clara (14)
- # cljdoc (18)
- # cljsrn (7)
- # clojure (29)
- # clojure-australia (4)
- # clojure-europe (34)
- # clojure-italy (3)
- # clojure-nl (5)
- # clojure-seattle (1)
- # clojure-uk (33)
- # clojuredesign-podcast (2)
- # clojurescript (33)
- # code-reviews (17)
- # core-async (10)
- # cursive (8)
- # datomic (21)
- # depstar (45)
- # dirac (4)
- # duct (10)
- # emacs (1)
- # fulcro (8)
- # jackdaw (2)
- # jobs (1)
- # kaocha (11)
- # leiningen (2)
- # off-topic (8)
- # pathom (35)
- # pedestal (3)
- # protorepl (13)
- # rdf (39)
- # re-frame (23)
- # reagent (2)
- # releases (1)
- # remote-jobs (6)
- # reveal (2)
- # rewrite-clj (18)
- # shadow-cljs (51)
- # sim-testing (2)
- # spacemacs (2)
- # tools-deps (37)
If I would have a macro like this:
user=> (require '[babashka.process :as bp :refer [$ check]] :reload)
nil
user=> (def sw (java.io.StringWriter.))
#'user/sw
user=> (-> ($ ls) ^{:out sw} ($ cat) check (do nil))
nil
user=> (str sw)
"LICENSE\nREADME.md\ndeps.edn\nsrc\ntest\n"
which can receive options via metadata, would this cause any problems with garbage collection of the options map in general?I don’t get the question I think. What is your concern in this case?
if the stringwriter isn't being referenced somewhere unexpected so it won't ever be cleaned up
Yeah I would think that if you didn’t have the (def sw ..)
it would be cleaned up after the 3rd statement (given *1
and *2
)
Ah yeah as far as I know it would be cleaned up 🙂
I just spent time tracking down some reflections that I wasn't warned about. They were happening inside a proxy
and I only noticed because the Reflector calls were taking up a huge chunk of my profiled flame charts. Is this normal?
Did the file of code in which these reflections were occurring have (set! **warn-on-reflection** true)
near the top?
In a Leiningen project, as far as I know that should be effectively the same as putting that set!
in all of the source files, but it would help the investigation of the issue to put such a set!
in the file that had the reflection uses, and confirm that it still gives no reflection warnings when compiling, to be sure.
because warn-on-reflection was set in project.clj i was also getting a ton of reflection warnings from libraries (nrepl) that simply drowned out the 3 warnings from my own code
No worries. Cool that the Clojure compiler can already catch them.
There is an advantage to figuring out a way to make sure that errors you want to ignore, are not seen, keeping warnings you want to see short.
more info needed, would prefer a report with repro at https://ask.clojure.org
@veix.q5 What do you mean by "install a deps project"?
@seancorfield i'm using your depstar
Ah, so you need a pom.xml
file. That's where the group ID, artifact ID, and version would normally be specified.
clojure -Spom
will generate a skeleton pom.xml
for your project, based on your dependencies. And it will guess the group/artifact based on the project folder name, and pick an arbitrary initial version (`0.1.0-SNAPSHOT` I think?)
So then you edit pom.xml
to have the values you want, then run depstar
.