@alexmiller gitlibs will shell out to git instead of using jgit in the near future? (looking at these recent commits in the repo)
working towards that yes
all on a branch atm
but looking good so far
good to hear
@seancorfield Hello. I've created new library template for clj-new and published it on http://Clojars.org
Source code is here https://github.com/redstarssystems/rssyslib
When I'm trying to use it by clojure -X:clj-new :template rssyslib :name <http://my.org/mylib01|my.org/mylib01>
then clj-new can't find it on Clojars.
My ~/.clojure/deps.edn contains:
:clj-new {:extra-deps {seancorfield/clj-new {:mvn/version "1.1.243"}}
:exec-fn clj-new/create
:main-opts ["-m" "clj-new.create"]}
What I'm doing wrong?
mike@mbp02 projects clojure -X:clj-new :template rssyslib :name <http://my.org/mylib01|my.org/mylib01>
Failed with: Failed to resolve version for rssyslib:lein-template:jar:RELEASE: Could not find metadata rssyslib:lein-template/maven-metadata.xml in local (/Users/mike/.m2/repository)
Execution error (ExceptionInfo) at clj-new.helpers/resolve-remote-template (helpers.clj:181).
Could not load artifact for template: rssyslib
Tried coordinates:
[rssyslib/boot-template "RELEASE"]
[rssyslib/lein-template "RELEASE"]
For more detail, enable verbose logging with -v, -vv, or -vvv
Full report at:
/var/folders/l5/65w77gdx78zdb8ycr1cb2lhw0000gn/T/clojure-1964961708616204516.edn
@mike1452 clj-new
only looks for releases -- until you tell it to look for snapshots (and your lib is only a snapshot right now, yes?)
(! 737)-> clojure -X:new :template rssyslib :name <http://my.org/mylib01|my.org/mylib01> :snapshot true
Downloading: seancorfield/clj-new/maven-metadata.xml from clojars
Downloading: rssyslib/clj-template/maven-metadata.xml from clojars
Downloading: rssyslib/clj-template/0.1.0-SNAPSHOT/maven-metadata.xml from clojars
Generating project from library template <https://github.com/redstarssystems/rssyslib.git>
Your :clj-new
alias doesn't need :main-opts
BTW since you're invoking it with -X
:
:new {:extra-deps {seancorfield/clj-new {:mvn/version "RELEASE"}}
:exec-fn clj-new/create
:exec-args {:template lib}}
Yes, my lib has snapshot version. How can I tell to look for snapshots?
@mike1452 I just showed you.
(it's also explained in the clj-new
readme)
Oh! Now I see it! @seancorfield thank you!!
I wanted to check the template actually worked (which it did!).
If you want to check a template without publishing it to Clojars, you should be able to run clojure -X:new :template rssyslib ...
directly in your project's folder since the template will be on the classpath (via the src
path and your existing deps.edn
) and clj-new
tries to require the namespaces locally before starting to search clojars for clj templates (then boot templates, then lein templates).
Yes. I've checked it locally. It works fine. Now, I will make latest command for bumping version and then publish release.
Thank you!!!
I saw a blog post about infering dependencies for python projects based on imports, and it got me wondering if there are any projects that will look at clojure code and spit out a deps.edn for it
something Rich and I have been talking about for years :)
I wrote a little function that does its best https://gist.github.com/15186e238dc365fd72e2e09c3eb7561a but I was wondering it was tackled more seriously