Fork me on GitHub
#leiningen
<
2020-03-11
>
Joe Corneli14:03:03

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

Joe Corneli14:03:12

{: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 "" :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]]}}

Joe Corneli14:03:29

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

Joe Corneli14:03:07

$ lein catapult :[email protected]:8080/repl
:repositories detected in user-level profiles! [:user] 
See 
Could not find artifact lein-catapult:lein-catapult:jar:4fa2f909f334d2094b2885567f0f036da3518820 in central ()
Could not find artifact lein-catapult:lein-catapult:jar:4fa2f909f334d2094b2885567f0f036da3518820 in clojars ()
Could not transfer artifact lein-catapult:lein-catapult:jar:4fa2f909f334d2094b2885567f0f036da3518820 from/to public-github (): Cannot access  with type default using the available connector factories: BasicRepositoryConnectorFactory
Could not transfer artifact lein-catapult:lein-catapult:pom:4fa2f909f334d2094b2885567f0f036da3518820 from/to public-github (): Cannot access  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.

Joe Corneli14:03:28

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

Joe Corneli14:03:48

Am I doing something wrong here?

mikerod15:03:39

@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

mikerod15:03:59

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

mikerod15:03:03

if so, that’s probably your difference

mikerod15:03:26

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

mikerod15:03:38

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

mikerod15:03:02

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

Joe Corneli15:03:36

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

Joe Corneli15:03:47

{: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" ""]]
        :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.)

noisesmith16:03:49

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

👍 4
noisesmith16:03:06

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

noisesmith16:03:34

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

mikerod16:03:36

I agree there too

mikerod16:03:04

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

eprozium17:03:01

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