This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-09
Channels
- # adventofcode (229)
- # announcements (1)
- # beginners (9)
- # boot (1)
- # calva (11)
- # cider (14)
- # clojure (26)
- # clojure-kc (1)
- # clojurescript (46)
- # core-async (10)
- # cursive (6)
- # datomic (53)
- # figwheel-main (2)
- # fulcro (3)
- # hoplon (2)
- # hyperfiddle (1)
- # kaocha (2)
- # off-topic (11)
- # om (5)
- # quil (11)
- # re-frame (7)
- # reagent (6)
- # reitit (9)
- # shadow-cljs (9)
- # spacemacs (5)
- # vim (5)
hey guys, has anyone tried to use elide meta
flag for aot compilation? I used in directly on leiningen but whenever I inspect the running java jar with visualVm I still see lots of string relating to functions docstrings 😕 any idea what could be the problem?
can you show the leiningen line you added ?
I added: "-Dclojure.compiler.elide-meta=[:doc :file :line :added]"
here https://github.com/hiposfer/kamal/blob/master/project.clj#L35
and from where did you expect elide to remove to remove docstrings, your code or from your dependencies ?
odd enough, tried it for a moment myself too and i didn't see any change in my uberjar regardless of adding or removing :jvm-opts ["-Dclojure.compiler.elide-meta=[:doc :file :line :added]"]
in leiningen project file
sounds like a bug, only question is where 🙂
my project is on clojure 1.10-rc4 and leiningen 2.8.1 ontop of openjdk 11
https://clojure.org/reference/compilation well there is this
Are you aot compiling? This is a compiler flag.
@U064X3EF3 yes I'm aot compiling through lein: lein with-profile release uberjar
hey, I'm trying to use a java.util.LinkedList from clojure and I'm not able to call the remove(int index) method. It always calls remove(Object o). It tried (.remove theList ^int i)
and (.remove theList (Integer. i))
and I'm out of ideas.
For me, it only works if I annotate the type of the LinkedList
user=> (def a (java.util.LinkedList. [1 2 3]))
#'user/a
user=> a
(1 2 3)
user=> (.remove ^java.util.LinkedList a 0)
1
user=> a
(2 3)
in java land one can tell gradle to download dependencies along with sourcecode, so that ide's autocomplete can show you parameter types and and javadoc
can i somehow tell the same to leiningen ?
On cursive you can go to the definition of the method and intellij will ask you if it should download the sources. I know it is not what you asked but hope it helps
@U3JH98J4R Also, check out the official nrepl (network repl) documentation on the subject - https://nrepl.xyz/nrepl/usage/server.html#_embedding_nrepl