Olical / depot

Find newer versions of your dependencies in your deps.edn file
https://clojars.org/olical/depot
The Unlicense
260 stars 14 forks source link

`clj -A:outdated --update` touches dependencies not listed with `clj -A:outdated` #35

Closed teodorlu closed 5 years ago

teodorlu commented 5 years ago

Hello!

Using olical/depot {:mvn/version "1.8.2"}, I encountered a piece of surprising behavior:

  1. clj -A:outdated lists only deps outside of aliases
  2. clj -A:outdated --update updates not only deps outside of aliases, but also inside aliases.

Is there a rationale to this that I'm not seeing? Subjectively, I was glad it updated everything, though. Also, thanks a lot for a great tool!

Scroll on for the full shell session.

Teodor


teodorlu@T480s ~/workspace/clojure/scratch (git)-[master] % clj -A:outdated

|              Dependency | Current | Latest |
|-------------------------+---------+--------|
| cnuernber/libpython-clj |     1.1 |    1.3 |
|   datascript/datascript |  0.18.4 | 0.18.6 |
|        metosin/muuntaja |   0.6.4 |  0.6.5 |

Using olical/depot {:mvn/version "1.8.2"}, I encountered a piece of surprising behavior. Here's the shell session: Three deps listed! I wanted to update these. Let's go!

teodorlu@T480s ~/workspace/clojure/scratch (git)-[master] % clj -A:outdated --update
Updating: deps.edn
  cnuernber/libpython-clj {:mvn/version "1.1"} -> {:mvn/version "1.3"}
  metosin/muuntaja {:mvn/version "0.6.4"} -> {:mvn/version "0.6.5"}
  datascript/datascript {:mvn/version "0.18.4"} -> {:mvn/version "0.18.6"}
  cider/cider-nrepl {:mvn/version "0.22.0"} -> {:mvn/version "0.22.4"}
  org.clojure/test.check {:mvn/version "0.10.0-RC1"} -> {:mvn/version "0.10.0"}
  com.cognitect/test-runner {:sha "76568540e7f40268ad2b646110f237a60295fa3c"} -> {:sha "cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b"}

Woah, this was surprising. Here's my full deps.edn, after the update:

{:paths ["resources" "src"],
 :deps
 {org.clojure/clojure {:mvn/version "1.10.1"},
  cnuernber/libpython-clj {:mvn/version "1.3"},
  metosin/muuntaja {:mvn/version "0.6.5"},
  org.clojure/data.xml {:mvn/version "0.2.0-alpha6"},
  clj-org/clj-org {:mvn/version "0.0.2"},
  org.clojure/data.csv {:mvn/version "0.1.4"},
  hiccup {:mvn/version "1.0.5"},
  org.clojure/core.match {:mvn/version "0.3.0"},
  org.clojars.gmorpheme/organum {:mvn/version "0.1.1"},
  datascript/datascript {:mvn/version "0.18.6"},
  org.clojure/core.async {:mvn/version "0.4.500"}},
 :aliases
 {:cider
  {:extra-deps
   {org.clojure/clojure {:mvn/version "1.10.1"},
    cider/cider-nrepl {:mvn/version "0.22.4"}},
   :main-opts
   ["-m"
    "nrepl.cmdline"
    "--middleware"
    "[cider.nrepl/cider-middleware]"]},
  :test
  {:extra-paths ["test"],
   :extra-deps {org.clojure/test.check {:mvn/version "0.10.0"}}},
  :runner
  {:extra-deps
   {com.cognitect/test-runner
    {:git/url "https://github.com/cognitect-labs/test-runner",
     :sha "cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b"}},
   :main-opts ["-m" "cognitect.test-runner" "-d" "test"]}}}
Olical commented 5 years ago

Hmm I think this is related to #12 and I'm aware. It's something that required a rewrite of the project which has basically happened, just need to have more testing / polish before release.

If you'd like to try out the unreleased version you'll probably get some good results :smile:

teodorlu commented 5 years ago

Ah, that sounds good. Glad to hear you're aware of it, I admit I didn't try searching for an existing issue. I'm closing this, then.

Have a nice day!

Teodor