liquidz / antq

Point out your outdated dependencies.
Other
394 stars 22 forks source link

Transitive feature causes an execution error #225

Open dharrigan opened 1 year ago

dharrigan commented 1 year ago

Hi,

Trying out the new feature and with it on, I receive a error:

Execution error (ExceptionInfo) at clojure.tools.deps.extensions.git/coord-err (git.clj:46).
Failed to infer git url for: depify/depify

Full report at:
/tmp/clojure-13756800541967478245.edn

Here is my stripped down deps:

{:aliases
 {:antq {:replace-paths ["."]
         :replace-deps {com.github.liquidz/antq {:mvn/version "2.5.1089"}
                        org.slf4j/slf4j-nop {:mvn/version "2.0.7"}}
         :exec-fn antq.tool/outdated
         :exec-args {:download true
                     :force true
                     :no-changes true
                     :transitive true
                     :skip ["pom" "boot" "leiningen"]
                     :upgrade true
                     :verbose true}}

  :depify {:extra-deps {depify/depify {:git/url "https://github.com/hagmonk/depify"
                                       :git/sha "b3f61517c860518c1990133aa6eb54caf1e4d591"}}
           :main-opts  ["-m" "depify.project"]}}}

If you remove the :transitive key or set it to false, all is well.

Do let me know if you require any further information.

-=david=-

liquidz commented 1 year ago

@dharrigan Thank you for your reporting! I could reproduce the problem with the following deps.edn.

{:deps {depify/depify {:git/url "https://github.com/hagmonk/depify"
                       :git/sha "b3f61517c860518c1990133aa6eb54caf1e4d591"}}}
liquidz commented 1 year ago

@dharrigan Just released v2.5.1095 :) Could you try the latest version?

dharrigan commented 1 year ago

Hi,

Thank you. Tried it out, getting a new error:

Downloading: dorothy/dorothy/0.0.7/dorothy-0.0.7.pom from central
Downloading: org/apache/commons/commons-parent/50/commons-parent-50.pom from central
Execution error (ExceptionInfo) at clojure.tools.deps.extensions/eval11638$fn (extensions.clj:133).
Unable to compare versions for org.clojure/tools.deps.alpha: {:git/url "https://github.com/clojure/tools.deps.alpha", :git/sha "884d7ae5b9c228ff795e4385291708102f1cd46d", :deps/manifest :deps, :deps/root "/home/david/.gitlibs/libs/org.clojure/tools.deps.alpha/884d7ae5b9c228ff795e4385291708102f1cd46d"} and {:mvn/version "0.12.1090", :deps/manifest :mvn}
liquidz commented 1 year ago

@dharrigan Hmm, I could not reproduce the problem.

https://github.com/liquidz/antq/issues/225#issue-1761674507 Is this your whole deps.edn? Or do you have ~/.clojure/deps.edn?

dharrigan commented 1 year ago

Hi,

Yes, you may find it here:

https://github.com/dharrigan/depsconfig/

You may want to remove the repo stuff at the end (if necessary) since I have my own mirror of repos.

Hopefully it may help give some insight and produce the same thing I'm seeing.

-=david=-

liquidz commented 1 year ago

@dharrigan Thanks! I could reproduce the problem.

liquidz commented 1 year ago

@dharrigan It seems a problem of tools.deps. You can reproduce the problem with the following code.

(clojure.tools.deps/resolve-deps
 '{:deps {depify/depify {:git/sha "b3f61517c860518c1990133aa6eb54caf1e4d591" :git/url "https://github.com/hagmonk/depify"}
          slipset/deps-deploy {:mvn/version "0.2.1"}}
   :mvn/repos {"central" {:url "https://repo1.maven.org/maven2/"}
               "clojars" {:url "https://repo.clojars.org/"}}}
 nil)

depify and deps-deploy each have a :mvn/version and a :git/url under the name org.clojure/tools.deps.alpha, but it seems that tools.deps does not account for such cases.

dharrigan commented 1 year ago

Hi,

Thanks for the update. I removed depify from my deps.edn as I dont really use it. I switched on transitive again and I receive this error:

Downloading: org/slf4j/slf4j-nop/1.7.32/slf4j-nop-1.7.32.pom from central
Execution error (ExceptionInfo) at clojure.tools.deps.extensions/eval11638$fn (extensions.clj:133).
Unable to compare versions for io.github.clojure/tools.build: {:mvn/version "0.9.4", :exclusions #{com.google.guava/guava org.slf4j/slf4j-nop}, :deps/manifest :mvn} and {:git/tag "v0.9.2", :git/sha "fe6b1405ba888720c813c7488c03880be73bbe20", :git/url "https://github.com/clojure/tools.build.git", :deps/manifest :deps, :deps/root "/home/david/.gitlibs/libs/io.github.clojure/tools.build/fe6b1405ba888720c813c7488c03880be73bbe20"}

related to the issue you have discovered?

-=david=-

liquidz commented 1 year ago

@dharrigan It seems the same cause.

Since clojure.tools.deps.extensions/compare-versions is a multi method, so I can implement provisionally the cases [:mvn :git] or [:git :mvn]. But it should be supported by tools.deps officially.