Fork me on GitHub
#tools-deps2018-03-12
>
ghadi15:03:54

our depstar tool just got an awesome logo courtesy @quephird

alexmiller15:03:53

I’ll pretend I didn’t see that :)

alexmiller15:03:01

does quephird work with you?

alexmiller15:03:22

aw, cool. she’s great.

alexmiller15:03:30

I meant to put all that in pm to Ghadi :)

alexmiller17:03:25

Added a wiki page with tools that use t.d.a or clj https://github.com/clojure/tools.deps.alpha/wiki/Tools

alexmiller17:03:38

linked from the readme too if you’re trying to find it later

seancorfield17:03:53

I think that last line should be cljs-test-runner, not clj-test-runner (link is correct, text is not).

ghadi18:03:45

depstar is one word @alexmiller - thx for the mention

alexmiller18:03:09

it’s a wiki, fix as you like :)

alexmiller18:03:37

and if it’s misconfigured for edits, let me know

ghadi18:03:53

I'm getting a 403 when I clone then push @alexmiller

thheller18:03:03

@alexmiller https://github.com/thheller/shadow-cljs also supports using deps.edn via clojure. can't edit wiki.

ghadi18:03:49

(I can't remember if there is supposed to be an edit button in the UI -- but there isn't one visible)

alexmiller19:03:10

I’m sure it’s set wrong - seems like the default is always wrong :)

alexmiller19:03:19

@ghadi clone then push what?

ghadi19:03:16

the wiki repo

ghadi19:03:55

I think I was supposed to edit in the UI

alexmiller19:03:43

well that’s how normal people do it :) I’m getting Stu to change the setting

alexmiller21:03:49

other options like?

alexmiller21:03:08

oh, I see what you mean

alexmiller21:03:16

good idea, feel free to jira / patch

alexmiller21:03:58

that affects memoization of course so would need to probably expose the scrape function with a better name

dominicm21:03:47

tbh, if I was being very specific, it might be just that I need the version that Stu originally created where the different config files get labelled.

alexmiller21:03:56

well that idea is still in play for several reasons

alexmiller21:03:10

prob the same reasons you’re interested in it

alexmiller21:03:54

that’s going to be a mildly painful change though across the script and tda

dominicm21:03:19

alpha, baby 🙂

dominicm21:03:10

(I can picture Austin powers saying that)

mhuebert22:03:24

can a github dep in deps.edn specify the root path (into the repo) for the desired library?

mhuebert22:03:07

I have been publishing more than one library from a single repo

alexmiller22:03:14

Yeah with :deps/root

mhuebert22:03:35

would that be a relative or absolute path?

alexmiller22:03:47

Relative in the repo

alexmiller22:03:57

To the base dir

dominicm22:03:41

@mhuebert fyi, when a transitive dependency does :local/root, it is relative to where you're running clj from. So you can't put things in sub-dirs, it has to be flat.

dominicm22:03:58

We're doing this, you're not alone it's good fun 🙂

mhuebert22:03:15

hmm. ok. i am not using :local/root anywhere at the moment

mhuebert22:03:25

but I am seeing:

Error building classpath. nil
java.lang.NullPointerException
	at clojure.string$starts_with_QMARK_.invokeStatic(string.clj:364)
	at clojure.string$starts_with_QMARK_.invoke(string.clj:360)
	at clojure.tools.gitlibs.impl$call_with_auth.invokeStatic(impl.clj:48)
	at clojure.tools.gitlibs.impl$call_with_auth.invoke(impl.clj:41)
	at clojure.tools.gitlibs.impl$call_with_auth.invokeStatic(impl.clj:43)
	at clojure.tools.gitlibs.impl$call_with_auth.invoke(impl.clj:41)
	at clojure.tools.gitlibs.impl$git_fetch.invokeStatic(impl.clj:64)
	at clojure.tools.gitlibs.impl$git_fetch.invoke(impl.clj:61)
	at clojure.tools.gitlibs.impl$ensure_git_dir.invokeStatic(impl.clj:105)
	at clojure.tools.gitlibs.impl$ensure_git_dir.invoke(impl.clj:100)

mhuebert22:03:36

for the dep

lark/tools {:git/url ""
                    :sha "cc1305534b1371df3962fd46503dd0478d81a08a"
                    :deps/root "tools"}

mhuebert22:03:00

I can run deps from that directory locally (“tools”), it has a deps.edn file

dominicm22:03:13

fwiw, that should work, I used it at some point, 100%

mhuebert22:03:21

oh, maybe the name has to align with the github username and repo

seancorfield22:03:25

@mhuebert FWIW, I just ran

(! 581)-> clj -Sdeps '{:deps {lark/tools {:git/url ""
                    :sha "cc1305534b1371df3962fd46503dd0478d81a08a"
                    :deps/root "tools"}}}
'
and it worked fine and gave me a REPL.

mhuebert22:03:03

ok thanks for trying that. maybe i need to update my clj

mhuebert22:03:52

well that’s weird. that exact command doesn’t work on my machine, with latest clj from brew

seancorfield22:03:28

I'm on the latest clojure 1.9.0.358 already installed

seancorfield22:03:42

(output from brew upgrade clojure)

mhuebert22:03:47

yeah, me too

seancorfield22:03:17

I created a new folder mhuebert and dropped into there to run that command with no deps.edn file present, just to confirm it works on its own.

seancorfield22:03:47

If you have deps.edn, it will read that and maybe the NPE is coming from something else there?

mhuebert22:03:05

yeah I tried the same thing, ran it from a fresh directory in a new terminal window

mhuebert22:03:18

mysteries of the universe

seancorfield22:03:27

Maybe something in your ~/.clojure/deps.edn then?

mhuebert22:03:02

appears to be all commented out

mfikes22:03:17

Try -Srepro to be sure

mhuebert22:03:06

that produces a repl

mfikes22:03:22

You must have something in your deps.edn chain 🙂

mhuebert22:03:59

somehow the url passed to call-with-auth is nil, when it’s trying to fetch from github

mfikes22:03:03

Other hunch: Maybe a cache gone bad? and it needs to be forced

mhuebert22:03:39

(defn- call-with-auth
  ([^GitCommand command]
    (call-with-auth
      (.. command getRepository getConfig (getString "remote" "origin" "url"))
      command))
  ([^String url ^GitCommand command]
   (if (and (instance? TransportCommand command)
         (not (str/starts-with? url "http")))
     (.. ^TransportCommand command (setTransportConfigCallback @ssh-callback) call)
     (.call command))))

mhuebert22:03:45

third from bottom, the str/starts-with?

mhuebert22:03:50

is there some caching somewhere that I can clear?

mfikes22:03:12

I''d try without -Srepro and add -Sforce (but I'm speculating)

mhuebert22:03:10

oh, I maybe misread/communicated, I tried -Srepro by itself earlier

mhuebert22:03:15

clj -Srepro -Sforce -Sdeps '{:deps {lark/tools {:git/url ""
                     :sha "cc1305534b1371df3962fd46503dd0478d81a08a"
                     :deps/root "tools"}}}'

mhuebert22:03:34

still null pointer. hmm.

mhuebert22:03:19

i wonder if it could have anything to do with git auth

mhuebert22:03:10

well this will have to wait for another day