tools-build

mike_ananev 2022-02-03T21:56:49.360829Z

@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_ananev 2022-02-03T21:59:04.961549Z

This is in my deps.edn

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

2022-02-03T21:59:40.985729Z

have you run the build with wifi turned on?

Alex Miller (Clojure team) 2022-02-03T22:00:07.279119Z

Any more to the message than that?

mike_ananev 2022-02-03T22:03:07.961309Z

nope

mike_ananev 2022-02-03T22:03:22.871639Z

this is with internet

mike_ananev 2022-02-03T22:04:41.130479Z

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

mike_ananev 2022-02-03T22:04:46.016129Z

false alarm.

mike_ananev 2022-02-03T22:05:16.816249Z

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

Alex Miller (Clojure team) 2022-02-03T22:10:48.737129Z

Well you might have cached classpath now

Alex Miller (Clojure team) 2022-02-03T22:11:16.711369Z

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

mike_ananev 2022-02-03T22:00:20.362749Z

yes. with internet the build is succesfull

2022-02-03T22:01:34.727499Z

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

2022-02-03T22:05:44.156289Z

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

2022-02-03T22:06:21.540709Z

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

mike_ananev 2022-02-03T22:07:13.177589Z

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

2022-02-03T22:08:00.315089Z

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

๐Ÿ‘ 1
mike_ananev 2022-02-03T22:10:27.603649Z

is it intentional behaviour?

Alex Miller (Clojure team) 2022-02-03T22:12:48.553129Z

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) 2022-02-03T22:13:28.642769Z

Might be some optional thing we could do

mike_ananev 2022-02-03T22:13:59.837159Z

๐Ÿ‘