Fork me on GitHub
#tools-deps
<
2019-04-30
>
yuhan09:04:55

Is there any way to use a lein plugin in a tools.deps project? E.g. Codox, lein-ns-dep-graph

delaguardo09:04:56

@qythium most of lein plugins is just a normal projects. You can include them in your dependencies list and execute their -main function if exists or make your own custom -main. E.g. https://github.com/weavejester/codox/blob/master/codox/src/codox/main.clj#L116 there is main function to generate codox documentation. It requires some arguments that you have to assemble by yourself but there is nothing impossible. clj -Sdeps '{:deps {codox {:mvn/version "0.10.6"}}}' -e "(do (require 'codox.main) (codox.main/generate-docs))" Oneliner as a prove of concept

seancorfield16:04:27

And remember, if you're on Clojure 1.10, you can use requiring-resolve so that becomes -e "((requiring-resolve 'codox.main/generate-docs))"

yuhan10:04:52

wow, I can't believe that just worked out of the box 😮

yuhan10:04:10

fully formatted HTML docs of all the namespaces in a large project with zero setup, how awesome is that

cjohansen10:04:06

when changing the sha on git deps, I frequently run into a variation of this error:

cjohansen10:04:07

Cloning: [email protected]:mycomp/mylib.git
Error building classpath. Destination path "mylib" already exists and is not an empty directory
org.eclipse.jgit.api.errors.JGitInternalException: Destination path "mylib" already exists and is not an empty directory

cjohansen10:04:16

is this a known problem, or should I report it in jira?

dominicm10:04:01

I'm not aware of any similar reports in this channel, nor have I encountered it itself.

cjohansen10:04:45

hmm, I wonder if it could be a false message. I removed the lib from ~/.gitlibs/_repos, and then I see that it errors on auth, as I haven't sun ssh-add after a recent reboot

cjohansen10:04:59

so maybe that error above also was really caused by an authentication failure?

dominicm10:04:04

Maybe. Could be that there's more to be done with catching it correctly too though.

Alex Miller (Clojure team)11:04:42

I haven’t seen anything like this from anyone

cjohansen13:04:24

ok. I'll see if I can reproduce it and if so, report