Fork me on GitHub
#tools-deps
<
2019-07-23
>
ticean18:07:49

Is there a way to control HTTP timeouts or retries with Maven dependencies when using tools-deps? I must have a shakey connection because I’m getting HTTP errors when performing clojure -Stree. With enough retries I can get them all, but this isn’t working very well my build process. Any suggestions?

Alex Miller (Clojure team)18:07:30

no support for that, sorry

Alex Miller (Clojure team)18:07:14

I'm not even sure what Maven offers in the apis for that, but nothing is surfaced through tools.deps

ticean18:07:03

Ok, thanks for the response! Google tells me that there’s some Maven HTTP configurations through XML, but I have very little knowledge in this area. Most of my Maven interactions have been through Clojure tooling. 🙂

ticean18:07:25

I’ll try in the build server. Hopefully the probs are local to my network.

Alex Miller (Clojure team)18:07:09

XML in pom.xml or in settings.xml?

Alex Miller (Clojure team)18:07:11

yes, that's settings.xml, but this is for wagons, which is the "old stuff". tools.deps uses the newer Maven resolver with transports instead

Alex Miller (Clojure team)18:07:43

I doubt anything we're doing in tools.deps is looking at it right now (although honestly I'm not certain)

ticean19:07:05

Ah, I see. Thanks. I figured I was not getting something because I don’t know the ecosystem very well.

Alex Miller (Clojure team)19:07:19

we're using org.eclipse.aether.transport.http.HttpTransporter, which does seem to have some sort of configuration facility for http parameters. how to actually get that configured would take some spelunking

Alex Miller (Clojure team)19:07:21

I kinda see how it could be done

Alex Miller (Clojure team)19:07:09

anyhow, if you want to file a ticket to request this, you could do so at https://clojure.atlassian.net/servicedesk/customer/portal/1 - this is the first time I've seen someone ask for it, so pretty far down in the queue

ticean19:07:46

:thumbsup: Thanks. That’s understandable. Dependency pulls have worked well for me too, until my summer relocation to a cabin in the woods. Has been great for hammocking, now just trying to get those dependencies. 🙂

Alex Miller (Clojure team)19:07:12

you just need to mirror maven central and clojars before heading to the woods

😂 4
geraldodev19:07:06

Today I've found https://clojars.org/luchiniatwork/cambada which has been forked by https://github.com/mikeananev/cambada . Are you using any of those ? How are you doing aot in tools-deps. The fork is 1.0.4 , they are realeasing more often but the issue list is disabled.

avi20:07:29

I’m using Cambada in my project to do AOT and create an überjar. It’s been working well for me.

hiredman23:07:18

the clj script I have (version 1.9.0.375 I guess? from the -Sdescribe, not sure how to track that to a tools.dep version) doesn't seem to handle '-i' in what I thought was the correct way. my understanding is -i means "load this file and give me a repl", and what happens is it loads the file and then exits

seancorfield23:07:31

You need -r to get a REPL if you specify any of the main opts I think.

seancorfield23:07:52

(and it's still true on the latest version of the clj script I'm fairly sure)

seancorfield23:07:58

Confirmed:

(! 693)-> clj -Sdescribe
{:version "1.10.1.466"
 ...

Tue Jul 23 16:08:19
(sean)-(jobs:0)-(~/clojure)
(! 694)-> clj -i script.clj 
Hello from script

Tue Jul 23 16:08:29
(sean)-(jobs:0)-(~/clojure)
(! 695)-> clj -i script.clj -r
Clojure 1.10.1
Hello from script
user=> 

hiredman23:07:27

ah, I wonder if that has always been the case and I just forgot about it because of how little I use -i

hiredman23:07:39

looks like it

Alex Miller (Clojure team)23:07:47

That has been the same forever