Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transitive feature causes an execution error #225

Open
dharrigan opened this issue Jun 17, 2023 · 9 comments
Open

Transitive feature causes an execution error #225

dharrigan opened this issue Jun 17, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@dharrigan
Copy link
Sponsor Contributor

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
Copy link
Owner

liquidz commented Jun 17, 2023

@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 liquidz added the bug Something isn't working label Jun 17, 2023
@liquidz
Copy link
Owner

liquidz commented Jun 17, 2023

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

@dharrigan
Copy link
Sponsor Contributor Author

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
Copy link
Owner

liquidz commented Jun 18, 2023

@dharrigan Hmm, I could not reproduce the problem.

#225 (comment)
Is this your whole deps.edn?
Or do you have ~/.clojure/deps.edn?

@dharrigan
Copy link
Sponsor Contributor Author

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
Copy link
Owner

liquidz commented Jun 19, 2023

@dharrigan Thanks! I could reproduce the problem.

@liquidz
Copy link
Owner

liquidz commented Jun 23, 2023

@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
Copy link
Sponsor Contributor Author

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
Copy link
Owner

liquidz commented Jun 24, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants