leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
2020-03-11T14:45:03.023200Z

Hello, I'm trying to use lein-git-down inside of my .lein/profiles.clj profile

2020-03-11T14:45:12.023500Z

{:user {:plugins [[lein-pprint "1.1.1"]
                  [lein-ancient "0.6.15"]
                  [reifyhealth/lein-git-down "0.3.5"]
                  [lein-catapult "4fa2f909f334d2094b2885567f0f036da3518820"]]
        :middleware [lein-git-down.plugin/inject-properties]
        :repositories [["public-github" {:url "<git://github.com>" :protocol :ssh}]]
        :git-down {lein-catapult {:coordinates holtzermann17/lein-catapult}} ;)
        :dependencies [[slamhound "1.3.1"]]
        :injections [clojure.repl :refer [apropos
                                          demunge
                                          dir
                                          dir-fn
                                          doc
                                          find-doc
                                          pst
                                          root-cause
                                          set-break-handler!
                                          source
                                          source-fn
                                          stack-element-str
                                          thread-stopper]]}}

2020-03-11T14:45:29.024Z

This isn't working though, I get complaints that the jar file can't be found

2020-03-11T14:46:07.024400Z

$ lein catapult <http://USER>:PASS@127.0.0.1:8080/repl
:repositories detected in user-level profiles! [:user] 
See <https://github.com/technomancy/leiningen/wiki/Repeatability>
Could not find artifact lein-catapult:lein-catapult:jar:4fa2f909f334d2094b2885567f0f036da3518820 in central (<https://repo1.maven.org/maven2/>)
Could not find artifact lein-catapult:lein-catapult:jar:4fa2f909f334d2094b2885567f0f036da3518820 in clojars (<https://repo.clojars.org/>)
Could not transfer artifact lein-catapult:lein-catapult:jar:4fa2f909f334d2094b2885567f0f036da3518820 from/to public-github (<git://github.com>): Cannot access <git://github.com> with type default using the available connector factories: BasicRepositoryConnectorFactory
Could not transfer artifact lein-catapult:lein-catapult:pom:4fa2f909f334d2094b2885567f0f036da3518820 from/to public-github (<git://github.com>): Cannot access <git://github.com> with type default using the available connector factories: BasicRepositoryConnectorFactory
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

2020-03-11T14:46:28.024900Z

Same basic setup as in the .lein/profiles.clj file seems to work fine inside of a project.clj that I have been working on

2020-03-11T14:46:48.025100Z

Am I doing something wrong here?

2020-03-11T15:36:39.025900Z

@holtzermann17 Would need more details - it’d help to prefix your cmd with DEBUG=true to potentially get more context of the step that is happening

2020-03-11T15:36:59.026400Z

but if it works in your project.clj - do you mean as a “top-level” key - ie. not in a :profiles entry?

2020-03-11T15:37:03.026600Z

if so, that’s probably your difference

2020-03-11T15:37:26.027200Z

the .lein/profiles.clj level is the user profile - it’s a profile that is merged on later - perhaps merging this in at this point is too late

2020-03-11T15:37:38.027600Z

or perhaps the user profile is not being included as a profile in the task you ar running

2020-03-11T15:38:02.028100Z

eg. maybe you need to have lein with-profile +user catapult ...

2020-03-11T15:45:36.028900Z

Hi @mikerod, I got the dependency to load with jitpack so (short term) problem solved.

2020-03-11T15:46:47.029300Z

{:user {:plugins [[lein-pprint "1.1.1"]
                  [lein-ancient "0.6.15"]
                  [reifyhealth/lein-git-down "0.3.5"]
                  [com.github.holtzermann17/lein-catapult "4fa2f909f334d2094b2885567f0f036da3518820"]]
        :repositories [["jitpack" "<https://jitpack.io>"]]
        :dependencies [[slamhound "1.3.1"]]
        :injections [clojure.repl :refer [apropos
                                          demunge
                                          dir
                                          dir-fn
                                          doc
                                          find-doc
                                          pst
                                          root-cause
                                          set-break-handler!
                                          source
                                          source-fn
                                          stack-element-str
                                          thread-stopper]]}}
(Viz., this works.)

2020-03-11T16:40:49.029800Z

those injections look weird - lein expects code to run, not require clauses

👍 1
2020-03-11T16:41:06.030300Z

(not the question you asked, but I would be surprised if that didn't end up erroring)

2020-03-11T16:41:34.030900Z

also you can get all of those (plus pprint and javadoc) with (apply require clojure.main/repl-requires)

2020-03-11T16:51:36.031200Z

I agree there too

2020-03-11T16:52:04.031800Z

And still confused on original question. Wanted more debug details. And think profile merging is to blame

eprozium 2020-03-11T17:32:01.033800Z

lein.bat on the official page still seem to point to version 2.9.1 instead of the new 2.9.2 .