Fork me on GitHub
#tools-deps
<
2020-07-21
>
kenny02:07:49

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>
...

Alex Miller (Clojure team)02:07:55

are you making a new one or syncing?

kenny02:07:20

This resulted from this:

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

Alex Miller (Clojure team)02:07:32

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

kenny02:07:35

1.10.1.561

kenny02:07:11

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"]}}}

Alex Miller (Clojure team)02:07:31

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.

Alex Miller (Clojure team)02:07:02

is it ok after the first clojure -Spom ?

kenny02:07:27

No. It creates this:

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

kenny02:07:45

Second run:

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

Alex Miller (Clojure team)02:07:00

yeah, I know why it's doing this

Alex Miller (Clojure team)02:07:12

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

3
kenny02:07:32

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

Alex Miller (Clojure team)02:07:07

prior was tools.deps 0.8.677 which corresponds to 1.10.1.510

kenny02:07:43

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

Alex Miller (Clojure team)02:07:59

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

kenny02:07:23

Perfect. Thank you!

Alex Miller (Clojure team)02:07:08

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

kenny02:07:56

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 😬

seancorfield02:07:16

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

kenny02:07:31

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

👍 6
kenny02:07:00

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