Fork me on GitHub
#tools-build
<
2022-02-03
>
mike_ananev21:02:49

@seancorfield Hello. I'm trying to use build-clj to build uberjar and noticed that it cannot be used without internet. If I switch off wifi on my mac, then during the building uberjar I got this message "fatal: «https://github.com/seancorfield/build-clj.git/» unavailable: Could not resolve host: http://github.com" Is it possible to use local cache .gitlibs on machine to build artifact?

mike_ananev21:02:04

This is in my deps.edn

:build    {:deps       {io.github.seancorfield/build-clj {:git/tag "v0.6.7" :git/sha "22c2d09"}}
           :ns-default build}

hiredman21:02:40

have you run the build with wifi turned on?

Alex Miller (Clojure team)22:02:07

Any more to the message than that?

mike_ananev22:02:22

this is with internet

mike_ananev22:02:41

oops. something changed and now build is succesful without internet.

mike_ananev22:02:16

but I can't understand why I got such messages before. Magic.

Alex Miller (Clojure team)22:02:48

Well you might have cached classpath now

Alex Miller (Clojure team)22:02:16

It wouldn't surprise me if there was something that didn't work where it maybe could

mike_ananev22:02:20

yes. with internet the build is succesfull

hiredman22:02:34

I don't believe build-clj adds any dependencies or downloads anything, that is all in the hands of tools.deps

hiredman22:02:44

ah, using a :git/tag looks like it causes gitlibs (https://github.com/clojure/tools.gitlibs/blob/master/src/main/clojure/clojure/tools/gitlibs/impl.clj#L179) to unconditionally do a fetch

hiredman22:02:21

which, I guess makes sense, given that tags can be mutated

mike_ananev22:02:13

hmm. This error is flawing. Sometimes it appears, sometime disappears.

hiredman22:02:00

it will depend on if there is a .cpcache I bet

👍 1
mike_ananev22:02:27

is it intentional behaviour?

Alex Miller (Clojure team)22:02:48

It's intentional for there to be a cache, but I would be happy to see if we can address it if existing project is in gitlibs and it resolved the url but didn't need to

Alex Miller (Clojure team)22:02:28

Might be some optional thing we could do