tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
kenny 2020-07-21T02:31:49.446100Z

Any idea why clojure -Spom would sometimes result in duplicate entries? e.g., something like this:

...  
  <build>
    <build>
      <sourceDirectory>src</sourceDirectory>
    </build>
    <build>
      <sourceDirectory>src</sourceDirectory>
    </build>
  </build>
...

alexmiller 2020-07-21T02:32:55.446700Z

are you making a new one or syncing?

alexmiller 2020-07-21T02:33:02.447Z

and which clj version?

kenny 2020-07-21T02:33:20.447500Z

This resulted from this:

rm -rf pom.xml
clojure -Spom
clojure -Spom

alexmiller 2020-07-21T02:33:32.447800Z

the answer to your question is certainly that it's a bug :)

kenny 2020-07-21T02:33:35.448Z

1.10.1.561

kenny 2020-07-21T02:34:11.449200Z

This is my deps.edn

{:paths   ["src"]
 :aliases {:jar {:extra-deps {seancorfield/depstar {:mvn/version "1.0.94"}}
                 :main-opts  ["-m" "hf.depstar.jar" "s3-mvn-upload.jar"]}}}

alexmiller 2020-07-21T02:34:31.449600Z

there was a change to this in the prior version, which I actually have found was bad and a pretty subtle bug. I have a fix for it but haven't gotten it into master yet.

alexmiller 2020-07-21T02:35:02.450100Z

is it ok after the first clojure -Spom ?

kenny 2020-07-21T02:35:27.450500Z

No. It creates this:

<build>
    <build>
      <sourceDirectory>src</sourceDirectory>
    </build>
  </build>

kenny 2020-07-21T02:35:45.450700Z

Second run:

<build>
    <build>
      <sourceDirectory>src</sourceDirectory>
    </build>
    <build>
      <sourceDirectory>src</sourceDirectory>
    </build>
  </build>

alexmiller 2020-07-21T02:36:00.451100Z

yeah, I know why it's doing this

alexmiller 2020-07-21T02:36:12.451400Z

well I will try to get a fix out for it soon

1
kenny 2020-07-21T02:36:32.451900Z

Any idea which version doesn’t have this? 2 versions back?

alexmiller 2020-07-21T02:37:53.452300Z

check the changelog

alexmiller 2020-07-21T02:39:07.453300Z

prior was tools.deps 0.8.677 which corresponds to 1.10.1.510

alexmiller 2020-07-21T02:39:30.453700Z

use https://github.com/clojure/homebrew-tools#version-archive-tool-releases to fall back on mac

kenny 2020-07-21T02:39:43.454100Z

Yeah was looking for the mapping. Is there a place for tdeps -> brew version?

alexmiller 2020-07-21T02:39:59.454500Z

at the top of that changelog is a link to the other changelog

alexmiller 2020-07-21T02:40:05.454700Z

and vice versa

kenny 2020-07-21T02:40:23.455Z

Perfect. Thank you!

alexmiller 2020-07-21T02:41:08.455900Z

there was a bug in initial gen in the prior version too though so you may not be any happier

kenny 2020-07-21T02:42:56.457500Z

Haha alright. At some point it worked, at least for my simple use case, since I’ve been using -Spom to deploy libs to clojars. Or perhaps I’ve just never noticed it generating something incorrect 😬

seancorfield 2020-07-21T02:52:16.458500Z

Luckily http://clojars.org doesn't care I guess 🙂

kenny 2020-07-21T02:52:31.458900Z

For those wanting to simply upload a jar file to a S3 Maven repo, I created a small Clojure lib to do (some of) the right things. You can paste it into a bb script if you want it to go a bit faster. https://github.com/kennyjwilli/s3-mvn-upload

👍 2
kenny 2020-07-21T02:54:00.459300Z

Folks using Datomic’s dev-local may find that useful ^