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

Crash when reifying an interface #240

Open
marcomorain opened this issue Dec 12, 2017 · 7 comments
Open

Crash when reifying an interface #240

marcomorain opened this issue Dec 12, 2017 · 7 comments
Labels

Comments

@marcomorain
Copy link
Contributor

I've found a case where reifying an interface will crash the Eastwood process.

This code works OK, eastwood fails, but the error is useful:

(ns circle.event-publisher.client.async
  (:import
   [java.io Closeable]))

(set! *warn-on-reflection* true)

(defprotocol EventClient
  "Interface for swapping out client implementations."
  (register [this events])
  (close [this]))

(defn create-client
  [client]
    (reify
      Closeable
      (close [_])

      EventClient
      (register [_ events])))

The output is:

marc@gears ~/dev/circleci/audit-client $ lein eastwood
== Eastwood 0.2.5 Clojure 1.8.0 JVM 1.8.0_74
Directories scanned for source files:
  src test
== Linting circle.event-publisher.client ==
== Linting circle.event-publisher.client.async ==
Exception thrown during phase :analyze+eval of linting namespace circle.event-publisher.client.async
Got exception with extra ex-data:
    msg='Ambiguous method signature for method: close'
    (keys dat)=(:interfaces :method :file :end-column :params :matches :column :line :end-line :form)
    (:form dat)=
(^{:line 20} close ^{:line 20} [^{:line 20} _])

ExceptionInfo Ambiguous method signature for method: close
	clojure.core/ex-info (core.clj:4617)
	clojure.core/ex-info (core.clj:4617)
	eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.annotate-host-info/annotate-host-info (annotate_host_info.clj:93)
	eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.annotate-host-info/annotate-host-info (annotate_host_info.clj:20)
	clojure.lang.Var.invoke (Var.java:379)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.passes/compile-passes/fn--531/fn--536 (passes.clj:166)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.passes/compile-passes/fn--531/fn--538 (passes.clj:168)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.passes/compile-passes/fn--531/fn--538 (passes.clj:168)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.passes/compile-passes/fn--531/fn--538 (passes.clj:168)
	clojure.core/partial/fn--4761 (core.clj:2522)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196 (ast.clj:99)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196/walk--197 (ast.clj:96)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.utils/mapv' (utils.clj:208)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.utils/mapv' (utils.clj:202)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children/fn--187 (ast.clj:51)
	clojure.lang.PersistentVector.reduce (PersistentVector.java:341)
	clojure.core/reduce (core.clj:6544)
	clojure.core/reduce (core.clj:6527)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:49)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:46)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:64)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:58)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196 (ast.clj:99)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196/walk--197 (ast.clj:96)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children/fn--187 (ast.clj:51)
	clojure.lang.PersistentVector.reduce (PersistentVector.java:341)
	clojure.core/reduce (core.clj:6544)
	clojure.core/reduce (core.clj:6527)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:49)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:46)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:64)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:58)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196 (ast.clj:99)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196/walk--197 (ast.clj:96)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children/fn--187 (ast.clj:51)
	clojure.lang.PersistentVector.reduce (PersistentVector.java:341)
	clojure.core/reduce (core.clj:6544)
	clojure.core/reduce (core.clj:6527)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:49)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:46)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:64)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:58)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196 (ast.clj:99)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196/walk--197 (ast.clj:96)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children/fn--187 (ast.clj:51)
	clojure.lang.PersistentVector.reduce (PersistentVector.java:341)
	clojure.core/reduce (core.clj:6544)
	clojure.core/reduce (core.clj:6527)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:49)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:46)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:64)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:58)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196 (ast.clj:99)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196/walk--197 (ast.clj:96)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.utils/mapv' (utils.clj:208)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.utils/mapv' (utils.clj:202)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children/fn--187 (ast.clj:51)
	clojure.lang.PersistentVector.reduce (PersistentVector.java:341)
	clojure.core/reduce (core.clj:6544)
	clojure.core/reduce (core.clj:6527)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:49)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:46)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:64)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:58)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196 (ast.clj:99)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196/walk--197 (ast.clj:96)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children/fn--187 (ast.clj:51)
	clojure.lang.PersistentVector.reduce (PersistentVector.java:341)
	clojure.core/reduce (core.clj:6544)
	clojure.core/reduce (core.clj:6527)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:49)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:46)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:64)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:58)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196 (ast.clj:99)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196/walk--197 (ast.clj:96)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children/fn--187 (ast.clj:51)
	clojure.lang.PersistentVector.reduce (PersistentVector.java:341)
	clojure.core/reduce (core.clj:6544)
	clojure.core/reduce (core.clj:6527)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:49)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/-update-children (ast.clj:46)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:64)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/update-children-reduced (ast.clj:58)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk/walk--196 (ast.clj:99)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk (ast.clj:95)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk (ast.clj:84)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk (ast.clj:92)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/walk (ast.clj:84)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/prewalk (ast.clj:108)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.ast/prewalk (ast.clj:105)
	eastwood.copieddeps.dep1.clojure.tools.analyzer.passes/compile-passes/analyze--543 (passes.clj:170)
	clojure.core/comp/fn--4727 (core.clj:2460)
	clojure.core/comp/fn--4727 (core.clj:2460)
	clojure.core/comp/fn--4727 (core.clj:2460)
	eastwood.analyze-ns/run-passes (analyze_ns.clj:171)
	eastwood.analyze-ns/run-passes (analyze_ns.clj:167)
	eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm/analyze/fn--3830/fn--3832 (jvm.clj:469)
	eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm/analyze/fn--3830 (jvm.clj:467)
	clojure.core/apply (core.clj:646)
	clojure.core/with-bindings* (core.clj:1881)
	clojure.core/with-bindings* (core.clj:1881)
	eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm/analyze (jvm.clj:456)
	eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm/analyze (jvm.clj:436)
	eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm/analyze+eval (jvm.clj:532)
	eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm/analyze+eval (jvm.clj:477)
	eastwood.analyze-ns/analyze-file/fn--4533/fn--4535 (analyze_ns.clj:293)
	eastwood.analyze-ns/analyze-file/fn--4533 (analyze_ns.clj:291)
	eastwood.analyze-ns/analyze-file (analyze_ns.clj:289)
	eastwood.analyze-ns/analyze-file (analyze_ns.clj:223)
	eastwood.analyze-ns/analyze-ns (analyze_ns.clj:342)
	eastwood.analyze-ns/analyze-ns (analyze_ns.clj:320)
	eastwood.lint/lint-ns (lint.clj:601)
	eastwood.lint/lint-ns (lint.clj:593)
	eastwood.lint/eastwood-core/fn--6995 (lint.clj:1089)
	eastwood.lint/eastwood-core (lint.clj:1088)
	eastwood.lint/eastwood-core (lint.clj:1005)
	eastwood.lint/eastwood (lint.clj:1206)
	eastwood.lint/eastwood (lint.clj:1187)
	eastwood.lint/eastwood-from-cmdline (lint.clj:1219)
	eastwood.lint/eastwood-from-cmdline (lint.clj:1218)
	clojure.lang.Var.invoke (Var.java:379)
	eastwood.versioncheck/run-eastwood (versioncheck.clj:15)
	eastwood.versioncheck/run-eastwood (versioncheck.clj:9)
	user/eval23 (form-init1517561367679697341.clj:1)
	user/eval23 (form-init1517561367679697341.clj:1)
	clojure.lang.Compiler.eval (Compiler.java:6927)
	clojure.lang.Compiler.eval (Compiler.java:6917)
	clojure.lang.Compiler.load (Compiler.java:7379)
	clojure.lang.Compiler.loadFile (Compiler.java:7317)
	clojure.main/load-script (main.clj:275)
	clojure.main/init-opt (main.clj:277)
	clojure.main/init-opt (main.clj:277)
	clojure.main/initialize (main.clj:308)
	clojure.main/null-opt (main.clj:342)
	clojure.main/null-opt (main.clj:339)
	clojure.main/main (main.clj:421)
	clojure.main/main (main.clj:384)
	clojure.lang.Var.invoke (Var.java:383)
	clojure.lang.Var.applyTo (Var.java:700)
	clojure.main.main (main.java:37)

The following form was being processed during the exception:
(defn
 create-client
 [client]
 (reify Closeable (close [_]) EventClient (register [_ events])))


Shown again with metadata for debugging (some metadata elided for brevity):
^{:line 14}
(^{:line 14} defn
 ^{:line 14} create-client
 ^{:line 15} [^{:line 15} client]
 ^{:line 16}
 (^{:line 16} reify
  ^{:line 19} Closeable
  ^{:line 20} (^{:line 20} close ^{:line 20} [^{:line 20} _])
  ^{:line 22} EventClient
  ^{:line 23}
  (^{:line 23} register
   ^{:line 23} [^{:line 23} _ ^{:line 23} events])))


An exception was thrown while analyzing namespace circle.event-publisher.client.async
Lint results may be incomplete.  If there are compilation errors in
your code, try fixing those.  If not, check above for info on the
exception.

Exception thrown while analyzing last namespace.

== Warnings: 0 (not including reflection warnings)  Exceptions thrown: 1
Subprocess failed

But when I import the interface from another file, eastwood crashes harder:

(ns circle.event-publisher.client
  (:require
   [clojure.tools.logging :refer [infof]]))

(defprotocol EventClient
  "Interface for swapping out client implementations."
  (register [this events])
  (close [this]))
(ns circle.event-publisher.client.async
  (:require
   [circle.event-publisher.client :as client])
  (:import
   [java.io Closeable]))

(set! *warn-on-reflection* true)

(defn create-client
  [client]
    (reify
      Closeable
      (close [_])

      client/EventClient
      (register [_ events])))

The output is:

marc@gears ~/dev/circleci/audit-client $ lein eastwood
== Eastwood 0.2.5 Clojure 1.8.0 JVM 1.8.0_74
Directories scanned for source files:
  src test
== Linting circle.event-publisher.client ==
== Linting circle.event-publisher.client.async ==
Exception in thread "main" java.lang.VerifyError: (class: circle/event_publisher/client/async$reify__7514, method: close signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(/private/var/folders/_z/xf6qzs5x5v91l2_lh94d0rm80000gn/T/form-init4880529654075210337.clj:1:125)
	at clojure.lang.Compiler.load(Compiler.java:7391)
	at clojure.lang.Compiler.loadFile(Compiler.java:7317)
	at clojure.main$load_script.invokeStatic(main.clj:275)
	at clojure.main$init_opt.invokeStatic(main.clj:277)
	at clojure.main$init_opt.invoke(main.clj:277)
	at clojure.main$initialize.invokeStatic(main.clj:308)
	at clojure.main$null_opt.invokeStatic(main.clj:342)
	at clojure.main$null_opt.invoke(main.clj:339)
	at clojure.main$main.invokeStatic(main.clj:421)
	at clojure.main$main.doInvoke(main.clj:384)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at clojure.lang.Var.invoke(Var.java:383)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.Var.applyTo(Var.java:700)
	at clojure.main.main(main.java:37)
Caused by: java.lang.VerifyError: (class: circle/event_publisher/client/async$reify__7514, method: close signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at clojure.lang.RT.classForName(RT.java:2168)
	at clojure.lang.RT.classForName(RT.java:2177)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm.utils$maybe_class_from_string.invokeStatic(utils.clj:85)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm.utils$maybe_class_from_string.invoke(utils.clj:78)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm.utils$eval1218$fn__1219.invoke(utils.clj:103)
	at clojure.lang.MultiFn.invoke(MultiFn.java:229)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.validate$validate_tag.invokeStatic(validate.clj:231)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.validate$validate_tag.invoke(validate.clj:229)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.validate$validate.invokeStatic(validate.clj:270)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.validate$validate.invoke(validate.clj:240)
	at clojure.lang.Var.invoke(Var.java:379)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.passes$compile_passes$fn__531$fn__536.invoke(passes.clj:166)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.passes$compile_passes$fn__531$fn__538.invoke(passes.clj:168)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.passes$compile_passes$fn__531$fn__538.invoke(passes.clj:168)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.passes$compile_passes$fn__531$fn__538.invoke(passes.clj:168)
	at clojure.core$partial$fn__4761.invoke(core.clj:2522)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196.invoke(ast.clj:102)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196$walk__197.invoke(ast.clj:96)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children$fn__187.invoke(ast.clj:51)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
	at clojure.core$reduce.invokeStatic(core.clj:6544)
	at clojure.core$reduce.invoke(core.clj:6527)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invokeStatic(ast.clj:49)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:46)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invokeStatic(ast.clj:64)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:58)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196.invoke(ast.clj:99)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196$walk__197.invoke(ast.clj:96)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.utils$mapv_SINGLEQUOTE_.invokeStatic(utils.clj:208)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.utils$mapv_SINGLEQUOTE_.invoke(utils.clj:202)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children$fn__187.invoke(ast.clj:51)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
	at clojure.core$reduce.invokeStatic(core.clj:6544)
	at clojure.core$reduce.invoke(core.clj:6527)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invokeStatic(ast.clj:49)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:46)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invokeStatic(ast.clj:64)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:58)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196.invoke(ast.clj:99)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196$walk__197.invoke(ast.clj:96)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children$fn__187.invoke(ast.clj:51)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
	at clojure.core$reduce.invokeStatic(core.clj:6544)
	at clojure.core$reduce.invoke(core.clj:6527)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invokeStatic(ast.clj:49)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:46)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invokeStatic(ast.clj:64)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:58)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196.invoke(ast.clj:99)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196$walk__197.invoke(ast.clj:96)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children$fn__187.invoke(ast.clj:51)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
	at clojure.core$reduce.invokeStatic(core.clj:6544)
	at clojure.core$reduce.invoke(core.clj:6527)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invokeStatic(ast.clj:49)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:46)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invokeStatic(ast.clj:64)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:58)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196.invoke(ast.clj:99)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196$walk__197.invoke(ast.clj:96)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children$fn__187.invoke(ast.clj:51)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
	at clojure.core$reduce.invokeStatic(core.clj:6544)
	at clojure.core$reduce.invoke(core.clj:6527)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invokeStatic(ast.clj:49)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:46)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invokeStatic(ast.clj:64)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:58)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196.invoke(ast.clj:99)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196$walk__197.invoke(ast.clj:96)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.utils$mapv_SINGLEQUOTE_.invokeStatic(utils.clj:208)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.utils$mapv_SINGLEQUOTE_.invoke(utils.clj:202)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children$fn__187.invoke(ast.clj:51)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
	at clojure.core$reduce.invokeStatic(core.clj:6544)
	at clojure.core$reduce.invoke(core.clj:6527)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invokeStatic(ast.clj:49)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:46)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invokeStatic(ast.clj:64)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:58)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196.invoke(ast.clj:99)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196$walk__197.invoke(ast.clj:96)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children$fn__187.invoke(ast.clj:51)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
	at clojure.core$reduce.invokeStatic(core.clj:6544)
	at clojure.core$reduce.invoke(core.clj:6527)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invokeStatic(ast.clj:49)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:46)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invokeStatic(ast.clj:64)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:58)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196.invoke(ast.clj:99)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196$walk__197.invoke(ast.clj:96)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children$fn__187.invoke(ast.clj:51)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
	at clojure.core$reduce.invokeStatic(core.clj:6544)
	at clojure.core$reduce.invoke(core.clj:6527)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invokeStatic(ast.clj:49)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$_update_children.invoke(ast.clj:46)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invokeStatic(ast.clj:64)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$update_children_reduced.invoke(ast.clj:58)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk$walk__196.invoke(ast.clj:99)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk.invokeStatic(ast.clj:95)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$walk.invoke(ast.clj:84)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$postwalk.invokeStatic(ast.clj:115)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$postwalk.invoke(ast.clj:110)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$postwalk.invokeStatic(ast.clj:113)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.ast$postwalk.invoke(ast.clj:110)
	at eastwood.copieddeps.dep1.clojure.tools.analyzer.passes$compile_passes$analyze__543.invoke(passes.clj:170)
	at clojure.core$comp$fn__4727.invoke(core.clj:2460)
	at clojure.core$comp$fn__4727.invoke(core.clj:2460)
	at eastwood.analyze_ns$run_passes.invokeStatic(analyze_ns.clj:171)
	at eastwood.analyze_ns$run_passes.invoke(analyze_ns.clj:167)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm$analyze$fn__3830$fn__3832.invoke(jvm.clj:469)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm$analyze$fn__3830.invoke(jvm.clj:467)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:646)
	at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1881)
	at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1881)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm$analyze.invokeStatic(jvm.clj:456)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm$analyze.invoke(jvm.clj:436)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm$analyze_PLUS_eval.invokeStatic(jvm.clj:532)
	at eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm$analyze_PLUS_eval.invoke(jvm.clj:477)
	at eastwood.analyze_ns$analyze_file$fn__4533$fn__4535.invoke(analyze_ns.clj:293)
	at eastwood.analyze_ns$analyze_file$fn__4533.invoke(analyze_ns.clj:291)
	at eastwood.analyze_ns$analyze_file.invokeStatic(analyze_ns.clj:289)
	at eastwood.analyze_ns$analyze_file.doInvoke(analyze_ns.clj:223)
	at clojure.lang.RestFn.invoke(RestFn.java:486)
	at eastwood.analyze_ns$analyze_ns.invokeStatic(analyze_ns.clj:342)
	at eastwood.analyze_ns$analyze_ns.doInvoke(analyze_ns.clj:320)
	at clojure.lang.RestFn.invoke(RestFn.java:439)
	at eastwood.lint$lint_ns.invokeStatic(lint.clj:601)
	at eastwood.lint$lint_ns.invoke(lint.clj:593)
	at eastwood.lint$eastwood_core$fn__6995.invoke(lint.clj:1089)
	at eastwood.lint$eastwood_core.invokeStatic(lint.clj:1088)
	at eastwood.lint$eastwood_core.invoke(lint.clj:1005)
	at eastwood.lint$eastwood.invokeStatic(lint.clj:1206)
	at eastwood.lint$eastwood.invoke(lint.clj:1187)
	at eastwood.lint$eastwood_from_cmdline.invokeStatic(lint.clj:1219)
	at eastwood.lint$eastwood_from_cmdline.invoke(lint.clj:1218)
	at clojure.lang.Var.invoke(Var.java:379)
	at eastwood.versioncheck$run_eastwood.invokeStatic(versioncheck.clj:15)
	at eastwood.versioncheck$run_eastwood.invoke(versioncheck.clj:9)
	at user$eval23.invokeStatic(form-init4880529654075210337.clj:1)
	at user$eval23.invoke(form-init4880529654075210337.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:6927)
	at clojure.lang.Compiler.eval(Compiler.java:6917)
	at clojure.lang.Compiler.load(Compiler.java:7379)
	... 14 more
Subprocess failed
@vemv
Copy link
Collaborator

vemv commented Apr 1, 2021

Reproduced and reported at tools.analyzer level, sadly there isn't much we can do meanwhile

https://ask.clojure.org/index.php/10391/ambiguous-method-signature-method-thrown-clojure-wouldnt

@jfingerh
Copy link

jfingerh commented Apr 1, 2021

@vemv I am not necessarily advocating for this, as it requires keeping track of patches made to upstream libraries used by Eastwood, but most libraries used by Eastwood are "shaded", i.e. copied into Eastwood's own source code, and with their namespaces renamed, so that it is still possible to use Eastwood on projects that use different versions of those libraries without certain kinds of errors occurring if they conflicted. Thus it is certainly possible to make arbitrary local changes to Eastwood's shaded copy of any/all libs it uses, without waiting for upstream changes. You get the benefit of quicker turnaround, but the disadvantage that you have to maintain the local changes, and decide whether/how to merge them in when you decide to upgrade the version of the upstream library you want to use in future Eastwood versions.

@vemv
Copy link
Collaborator

vemv commented Apr 1, 2021

Thanks for the insight!

Yes, I got that impression from the codebase and applied a small patch here #359

But personally I'd think twice before creating larger changes.

I'd have hope that the reported issue would get fixed and accordingly we could upgrade or "cherry-pick" the fix.

But you are right in hinting that sadly there isn't much we can do meanwhile is, of course, not the last word or anything.

At the same time I'd try to have upsteam libs fix the bugs they may have. Using dolly/mranderson is one thing, taking responsibility for other libs' bugs might be a more delicate area.

@vemv vemv added the bug label Jan 9, 2022
@clov0

This comment was marked as off-topic.

@vemv

This comment was marked as off-topic.

@clov0

This comment was marked as off-topic.

@vemv

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants