This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-11
Channels
- # announcements (14)
- # beginners (119)
- # boot (9)
- # calva (7)
- # cider (12)
- # cljdoc (2)
- # cljsrn (28)
- # clojure (127)
- # clojure-dev (2)
- # clojure-europe (3)
- # clojure-italy (2)
- # clojure-losangeles (9)
- # clojure-nl (6)
- # clojure-spec (15)
- # clojure-uk (39)
- # clojurescript (35)
- # community-development (4)
- # cursive (9)
- # datascript (8)
- # datomic (5)
- # duct (3)
- # emacs (10)
- # fulcro (45)
- # graphql (3)
- # jobs (1)
- # kaocha (8)
- # luminus (2)
- # off-topic (121)
- # onyx (3)
- # pathom (15)
- # pedestal (31)
- # planck (5)
- # reagent (25)
- # reitit (3)
- # remote-jobs (1)
- # shadow-cljs (48)
- # slack-help (1)
- # sql (142)
- # tools-deps (78)
if I check some files into a resources
folder in my git repo, will someone who uses my repo as a git dep be able to see these resources? I remember there was an issue with this in tools.deps?
with leiningen it seems that lib/tools.jar is automatically on the classpath. with tools.deps it doesn’t seem so. what’s the best way to do it without using a cmd line like:
clj -Sdeps "{:deps {tools.jar {:local/root \"$JAVA_HOME/lib/tools.jar\"}}}"
you should not have to do this
it should automatically be included if you are using the JDK (not the JRE) afaik
are you accidentally using the JRE?
might also be some differences from Java 8 vs Java 9+ (post-module system) in the jdk file structure. I'm not sure there even is a tools.jar anymore?
oh yeah, as of java 9, tools.jar does not exist anymore
needing to include it directly is weird, and probably wrong
if the original question was about resources
, as long as that directory is listed in the :paths
on the dependent repo, then the depending repo will be able to see it
that stuff is dead
yes - javax.tools.DocumentationTool
I don't know the coords for it, but you should just be using it as normal Maven artifact
that seems to work out of the box:
$ clj
Clojure 1.10.0
user=> (import 'javax.tools.DocumentationTool)
javax.tools.DocumentationTool
prob doesn't in newer jdks
actually, it does on Java 11
so I can do something like this as with the older Doclet API? I want to generate EDN
I believe it is the replacement for all that old sun stuff, yes
I'm sure there are buckets of docs to read about it, I've never used it
It seems I do need the “dead” Doclet class if I’m using Java 8, since the jdk.javadoc stuff is only on Java 9
so I’m seeing this in the REPL:
(System/getProperty "java.home")
"/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre"
and the same with leiningen. But tools.jar is in ../jdk/lib/tools.jar.funny, it seems in 2012 people wrote a special plugin for this: https://github.com/pallet/lein-jdk-tools/blob/develop/src/lein_jdk_tools/plugin.clj#L11
I wonder that if I’m going to migrate to JDK 11 if my code will still be able to run for Java 8 users if I’m going to use those new classes, so I’m hesitant about it
it should be fine. that "new" doclet stuff has been around since at least java 7
seems better than building on something that has been pronounced dead and unsupported
but the new doclet stuff is only there since Java 9, or maybe I’m not finding the right stuff on google…
o wait: https://docs.oracle.com/javase/8/docs/jdk/api/javadoc/doclet/com/sun/javadoc/Doclet.html
everything com.sun is on the removal path
Old type: SeeTag New type: com.sun.source.doctree.LinkTree com.sun.source.doctree.SeeTree Hmm..
you can call lein fns from clj
@noprompt this is an example of calling lein using tools.deps: https://github.com/oakes/full-stack-clj-example nice hack
I added that to the wiki page :)
it doesnt work with git deps, it uses lein for dependency resolution when building the uberjar https://github.com/oakes/full-stack-clj-example/blob/master/prod.clj
Cool. I’ll check that out. pack
looks pretty nice. The Juxt folks tend to make decent things.
I’m coming from lein uberjar where you explicitly give it a ns to AOT compile. Also saw that Capsule main didn’t care about :gen-class
. Do you mean I should AOT compile with something else, and provide the output of that as extra-paths?
I found that there's a thing for every step of the process but none that puts all those bits together sadly
We're using (my fork of) depstar
at work for building uberjars. I'm also using it to build "thin" jars for deploying to Clojars (and I use mvn
deploy for that, so I run clj -Spom
, clj -A:uberjar
(alias for depstar's uberjar entry point), and then mvn deploy:deploy-file ...
)
(well, I have a little shell script that combines that -- and also updated the pom.xml
with the current SHA of the project so http://clojars.org can point to the commit on GitHub)
Darn. > This class must contain the start(Root) method. This is in Java 11 documentation for javadoc which is also used by those new ToolProvider thingies. But the start(Root) method is from the ancient com.sun code. So this buys me nothing… The documentation for the new Doclet interface doesn’t even mention this though. https://docs.oracle.com/en/java/javase/11/tools/javadoc.html