tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
kenny 2020-07-10T16:13:09.320400Z

Does anyone know of an up-to-date guide on deploying a jar to a private maven s3 repo? I've tried several different guides and they all reference deprecated or archived maven build plugins. It seems like such a simple task but there seems to be dozens of different ways to get it done.

kenny 2020-07-10T16:31:07.320500Z

Oh interesting... it appears all I need to do is

aws s3api put-object --bucket my-bucket --key release/my-group-id/my-artifact-id/my-version/my.jar

kenny 2020-07-10T18:06:15.321300Z

Actually, tools-deps does not seem completely satisfied with the above approach, printing Download corrupted: Checksum validation failed, no checksums available

kenny 2020-07-10T18:06:40.321500Z

Guessing it expects some additional files in s3 that are not placed via the simple put-object action.

2020-07-10T19:18:38.322300Z

If i have a lib calling a method that doesn't exist and i suspect its because two version of the lib exist and the one without it won, how can i verify this?

2020-07-10T19:19:22.323300Z

the stacktrace lists the class package and class name and i compared this against the output of Stree and their isn't a direct overlap

2020-07-10T19:20:08.323700Z

likley because stree is output a higher level of information

seancorfield 2020-07-10T19:24:52.324200Z

@drewverlee Which lib? Which class? Which method?

2020-07-10T19:27:13.325200Z

method: ""com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector;" lib that calls it: pack/pack.alpha https://github.com/juxt/pack.alpha.git @ 0c20aa5

2020-07-10T19:28:12.325600Z

well more accurately:

[{:type java.lang.NoSuchMethodError,
    :message
    "com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector;",
    :at
    [com.google.cloud.tools.jib.builder.steps.BuildAndCacheApplicationLayerStep
     makeList
     "BuildAndCacheApplicationLayerStep.java"
     67]}]

2020-07-10T19:29:50.326900Z

so google.cloud.tools.jib.builder calls com.google.common.collect.ImmutableList.toImmutableList and it doesn't exist. I assume that error isn't saying the arguments were bad in someway, its saying that method isn't there at all.

seancorfield 2020-07-10T19:38:08.327300Z

And what Google libs show up in clojure -Stree for you?

seancorfield 2020-07-10T19:38:37.327900Z

You may need to run clojure -Strace and see what other versions of the various Google libs were considered.

2020-07-10T19:40:37.329500Z

> And what Google libs show up in clojure -Stree for you? I see guava listed under one dep i just added to my project. Is that because Stree only shows the winner of the dep merge? I suppose i'm looking for everyone that tried to add it. I'll look at Strace more carefully.

2020-07-10T19:45:21.330Z

i see Strace contains anyone that wanted to add the dep. isee it all over the place here.

seancorfield 2020-07-10T19:50:10.330600Z

The output of -Strace should show you every version of every library that it considered and why it made the decision it did to pick a particular version.

seancorfield 2020-07-10T19:51:01.330900Z

https://guava.dev/releases/21.0/api/docs/com/google/common/collect/ImmutableList.html#toImmutableList-- shows that method was added in Guava 21.0

seancorfield 2020-07-10T19:52:49.332200Z

So you could just add a top-level dep on Guava to force a recent version, but I'm surprised tools.deps would pick a lower version, since I would expect the Google Cloud libs you're using to pull in at least that version or higher...

seancorfield 2020-07-10T19:54:04.332600Z

According to Guava's docs, it's up to 28.0 now. 👀

seancorfield 2020-07-10T19:54:55.332900Z

Hmm, odd, we're using 29.0 at work...

seancorfield 2020-07-10T19:55:56.333500Z

21.0 is about 3 1/2 years old at this point. 29.0 came out in April this year @drewverlee

seancorfield 2020-07-10T19:56:59.334200Z

We've had to pin it as a top-level dependency because other things were bringing in older versions. Java's equivalent of "DLL hell" 🙂