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

1.8.1 Execution error #20

Closed kanwei closed 5 years ago

kanwei commented 5 years ago
 "Execution error (UnsupportedOperationException) at rewrite_clj.node.uneval.UnevalNode/sexpr (uneval.clj:6).\nnull\n",
 :clojure.main/triage
 {:clojure.error/class java.lang.UnsupportedOperationException,
  :clojure.error/line 6,
  :clojure.error/symbol rewrite_clj.node.uneval.UnevalNode/sexpr,
  :clojure.error/source "uneval.clj",
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type java.lang.UnsupportedOperationException,
    :at [rewrite_clj.node.uneval.UnevalNode sexpr "uneval.clj" 6]}],
  :trace
  [[rewrite_clj.node.uneval.UnevalNode sexpr "uneval.clj" 6]
   [rewrite_clj.zip.base$sexpr invokeStatic "base.clj" 49]
   [rewrite_clj.zip.base$sexpr invoke "base.clj" 46]
   [depot.zip$lib_QMARK_ invokeStatic "zip.clj" 100]
   [depot.zip$lib_QMARK_ invoke "zip.clj" 94]
   [clojure.core$complement$fn__5671 invoke "core.clj" 1441]
   [clojure.core$drop_while$step__5942 invoke "core.clj" 2974]
   [clojure.core$drop_while$fn__5945 invoke "core.clj" 2977]
   [clojure.lang.LazySeq sval "LazySeq.java" 42]
   [clojure.lang.LazySeq seq "LazySeq.java" 51]
   [clojure.lang.LazySeq first "LazySeq.java" 73]
   [clojure.lang.RT first "RT.java" 692]
   [clojure.core$first__5386 invokeStatic "core.clj" 55]
   [clojure.core$first__5386 invoke "core.clj" 55]
   [rewrite_clj.zip.find$find invokeStatic "find.clj" 33]
   [rewrite_clj.zip.find$find invoke "find.clj" 21]
   [rewrite_clj.zip.find$find_next invokeStatic "find.clj" 48]
   [rewrite_clj.zip.find$find_next invoke "find.clj" 41]
   [rewrite_clj.zip.find$find_next_depth_first
    invokeStatic
    "find.clj"
    55]
   [rewrite_clj.zip.find$find_next_depth_first invoke "find.clj" 50]
   [depot.zip$next_lib invokeStatic "zip.clj" 108]
   [depot.zip$next_lib invoke "zip.clj" 105]
   [depot.zip$transform_libs invokeStatic "zip.clj" 136]
   [depot.zip$transform_libs doInvoke "zip.clj" 131]
   [clojure.lang.RestFn invoke "RestFn.java" 425]
   [depot.outdated.resolve_virtual$resolve_all
    invokeStatic
    "resolve_virtual.clj"
    20]
   [depot.outdated.resolve_virtual$resolve_all
    invoke
    "resolve_virtual.clj"
    18]
   [depot.outdated.resolve_virtual$update_deps_edn_BANG_
    invokeStatic
    "resolve_virtual.clj"
    39]
   [depot.outdated.resolve_virtual$update_deps_edn_BANG_
    invoke
    "resolve_virtual.clj"
    34]
   [depot.outdated.main$_main invokeStatic "main.clj" 52]
   [depot.outdated.main$_main doInvoke "main.clj" 33]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.core$apply invokeStatic "core.clj" 665]
   [clojure.main$main_opt invokeStatic "main.clj" 514]
   [clojure.main$main_opt invoke "main.clj" 510]
   [clojure.main$main invokeStatic "main.clj" 665]
   [clojure.main$main doInvoke "main.clj" 618]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]]}}

Works fine on 1.8.0

Olical commented 5 years ago

Works fine for me in the three modes I tried. Can you give us some more background such as a deps.edn and command that reproduces this? Thanks.

Olical commented 5 years ago

Found a minimal reproduction deps.edn: {:aliases {#_#_:foo {:x :y}}}. It's something to do with depot.zip/lib? being given something it can't handle when that's inside deps.edn.

Olical commented 5 years ago

Ah, maybe it's just this bug: https://github.com/xsc/rewrite-clj/issues/70

Does this sound familiar to you, @plexus :sweat_smile: maybe nothing can be done until it's fixed upstream?

plexus commented 5 years ago

We have our own dzip/right and dzip/left to work around that bug, so that shouldn't be the problem, but might be some other places where we need to be wary of uneval nodes. I'll try to make some time to look into it.

plexus commented 5 years ago

@kanwei cool to see you're using the --resolve-virtual functionality already! I've pushed a fix, could you please try this to see if that fixes it for you?

clj -Sdeps '{:deps {olical/depot {:git/url "https://github.com/plexus/depot.git" :sha "7b2a957101483376b5b712525d2593e52431e756"}}}' -m depot.outdated.main --resolve-virtual

I also commented on the upstream issue, it would make things a lot easier if we could get this fixed in rewrite-clj. (https://github.com/xsc/rewrite-clj/issues/70)

Olical commented 5 years ago

I could reproduce it and this gets it working again, nice one! Thank you very much for the work, I'll get the fix out now.

Olical commented 5 years ago

Released under v1.8.2.