This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-23
Channels
- # announcements (11)
- # architecture (14)
- # babashka (34)
- # bangalore-clj (8)
- # beginners (108)
- # calva (10)
- # cider (19)
- # circleci (9)
- # clj-kondo (19)
- # clojars (4)
- # clojure (62)
- # clojure-australia (2)
- # clojure-europe (62)
- # clojure-italy (14)
- # clojure-nl (8)
- # clojure-poland (1)
- # clojure-spec (14)
- # clojure-uk (59)
- # clojurescript (14)
- # community-development (5)
- # conjure (2)
- # core-async (10)
- # cryogen (1)
- # cursive (11)
- # data-science (1)
- # datahike (13)
- # datomic (21)
- # deps-new (4)
- # ethereum (1)
- # events (4)
- # fulcro (34)
- # helix (2)
- # jobs (2)
- # juxt (33)
- # kaocha (4)
- # lsp (18)
- # malli (4)
- # membrane (2)
- # off-topic (23)
- # re-frame (3)
- # reitit (4)
- # remote-jobs (1)
- # reveal (6)
- # shadow-cljs (47)
- # slack-help (2)
- # spacemacs (5)
- # sql (45)
- # startup-in-a-month (6)
- # testing (4)
- # tools-deps (21)
- # xtdb (4)
@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
@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
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
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 :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
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