2024 Clojure 状况调查中分享您的想法!

欢迎!请查看关于页面获取更多关于这个网站如何运作的信息。

+1
Clojure
编辑

当使用 Clojure 1.11 编译(通过 athos/clj-check)一些使用 org.clojure/math.combinatorics 的代码时,我遇到了以下异常。相同的代码使用 Clojure 1.10.3 编译时没有任何警告或错误。

这是预期的吗?

{:clojure.main/message
 "Execution error (IllegalStateException) at fastmath.stats$median_absolute_deviation$fn__3484/invokePrim (stats.clj:227).\nAttempting to call unbound fn: #'fastmath.core/abs\n",
 :clojure.main/triage
 {:clojure.error/class java.lang.IllegalStateException,
  :clojure.error/line 227,
  :clojure.error/cause
  "Attempting to call unbound fn: #'fastmath.core/abs",
  :clojure.error/symbol
  fastmath.stats$median_absolute_deviation$fn__3484/invokePrim,
  :clojure.error/source "stats.clj",
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type clojure.lang.Compiler$CompilerException,
    :message
    "Syntax error macroexpanding at (fastmath/stats.clj:499:1).",
    :data
    {:clojure.error/phase :execution,
     :clojure.error/line 499,
     :clojure.error/column 1,
     :clojure.error/source "fastmath/stats.clj"},
    :at [clojure.lang.Compiler load "Compiler.java" 7665]}
   {:type java.lang.IllegalStateException,
    :message "Attempting to call unbound fn: #'fastmath.core/abs",
    :at [clojure.lang.Var$Unbound throwArity "Var.java" 45]}],
  :trace
  [[clojure.lang.Var$Unbound throwArity "Var.java" 45]
   [clojure.lang.AFn invoke "AFn.java" 32]
   [fastmath.stats$median_absolute_deviation$fn__3484
    invokePrim
    "stats.clj"
    227]
   [fastmath.stats$median_absolute_deviation$fn__3484
    invoke
    "stats.clj"
    -1]
   [clojure.core$map$fn__5935 invoke "core.clj" 2772]
   [clojure.lang.LazySeq sval "LazySeq.java" 42]
   [clojure.lang.LazySeq seq "LazySeq.java" 51]
   [clojure.lang.RT seq "RT.java" 535]
   [clojure.lang.Numbers double_array "Numbers.java" 1259]
   [fastmath.core$seq__GT_double_array invokeStatic "core.clj" 1031]
   [fastmath.core$seq__GT_double_array invoke "core.clj" 1024]
   [fastmath.stats$percentile invokeStatic "stats.clj" 111]
   [fastmath.stats$percentile invokePrim "stats.clj" -1]
   [fastmath.stats$median invokeStatic "stats.clj" 169]
   [fastmath.stats$median invokePrim "stats.clj" -1]
   [fastmath.stats$median_absolute_deviation
    invokeStatic
    "stats.clj"
    227]
   [fastmath.stats$median_absolute_deviation invokePrim "stats.clj" -1]
   [fastmath.stats$stats_map invokeStatic "stats.clj" 472]
   [fastmath.stats$stats_map invoke "stats.clj" 454]
   [fastmath.stats$stats_map invokeStatic "stats.clj" 459]
   [fastmath.stats$stats_map invoke "stats.clj" 454]
   [fastmath.stats$eval3559 invokeStatic "stats.clj" 499]
   [fastmath.stats$eval3559 invoke "stats.clj" 499]
   [clojure.lang.Compiler eval "Compiler.java" 7194]
   [clojure.lang.Compiler load "Compiler.java" 7653]
   [clojure.lang.RT loadResourceScript "RT.java" 381]
   [clojure.lang.RT loadResourceScript "RT.java" 372]
   [clojure.lang.RT load "RT.java" 459]
   [clojure.lang.RT load "RT.java" 424]
   [clojure.core$load$fn__6908 invoke "core.clj" 6161]
   [clojure.core$load invokeStatic "core.clj" 6160]
   [clojure.core$load doInvoke "core.clj" 6144]
   [clojure.lang.RestFn invoke "RestFn.java" 408]
   [clojure.core$load_one invokeStatic "core.clj" 5933]
   [clojure.core$load_one invoke "core.clj" 5928]
   [clojure.core$load_lib$fn__6850 invoke "core.clj" 5975]
   [clojure.core$load_lib invokeStatic "core.clj" 5974]
   [clojure.core$load_lib doInvoke "core.clj" 5953]
   [clojure.lang.RestFn applyTo "RestFn.java" 142]
   [clojure.core$apply invokeStatic "core.clj" 669]
   [clojure.core$load_libs invokeStatic "core.clj" 6016]
   [clojure.core$load_libs doInvoke "core.clj" 6000]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.core$apply invokeStatic "core.clj" 669]
   [clojure.core$require invokeStatic "core.clj" 6038]
   [clojure.core$require doInvoke "core.clj" 6038]
   [clojure.lang.RestFn invoke "RestFn.java" 703]
   [clojure2d.color$eval1064$loading__6789__auto____1065
    invoke
    "color.clj"
    1]
   [clojure2d.color$eval1064 invokeStatic "color.clj" 1]
   [clojure2d.color$eval1064 invoke "color.clj" 1]
   [clojure.lang.Compiler eval "Compiler.java" 7194]
   [clojure.lang.Compiler eval "Compiler.java" 7183]
   [clojure.lang.Compiler load "Compiler.java" 7653]
   [clojure.lang.RT loadResourceScript "RT.java" 381]
   [clojure.lang.RT loadResourceScript "RT.java" 372]
   [clojure.lang.RT load "RT.java" 459]
   [clojure.lang.RT load "RT.java" 424]
   [clojure.core$load$fn__6908 invoke "core.clj" 6161]
   [clojure.core$load invokeStatic "core.clj" 6160]
   [clojure.core$load doInvoke "core.clj" 6144]
   [clojure.lang.RestFn invoke "RestFn.java" 408]
   [clojure.core$load_one invokeStatic "core.clj" 5933]
   [clojure.core$load_one invoke "core.clj" 5928]
   [clojure.core$load_lib$fn__6850 invoke "core.clj" 5975]
   [clojure.core$load_lib invokeStatic "core.clj" 5974]
   [clojure.core$load_lib doInvoke "core.clj" 5953]
   [clojure.lang.RestFn applyTo "RestFn.java" 142]
   [clojure.core$apply invokeStatic "core.clj" 669]
   [clojure.core$load_libs invokeStatic "core.clj" 6016]
   [clojure.core$load_libs doInvoke "core.clj" 6000]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.core$apply invokeStatic "core.clj" 669]
   [clojure.core$require invokeStatic "core.clj" 6038]
   [clojure.core$require doInvoke "core.clj" 6038]
   [clojure.lang.RestFn invoke "RestFn.java" 619]
   [clojure2d.core$eval1056$loading__6789__auto____1057
    invoke
    "core.clj"
    1]
   [clojure2d.core$eval1056 invokeStatic "core.clj" 1]
   [clojure2d.core$eval1056 invoke "core.clj" 1]
   [clojure.lang.Compiler eval "Compiler.java" 7194]
   [clojure.lang.Compiler eval "Compiler.java" 7183]
   [clojure.lang.Compiler load "Compiler.java" 7653]
   [clojure.lang.RT loadResourceScript "RT.java" 381]
   [clojure.lang.RT loadResourceScript "RT.java" 372]
   [clojure.lang.RT load "RT.java" 459]
   [clojure.lang.RT load "RT.java" 424]
   [clojure.core$load$fn__6908 invoke "core.clj" 6161]
   [clojure.core$load invokeStatic "core.clj" 6160]
   [clojure.core$load doInvoke "core.clj" 6144]
   [clojure.lang.RestFn invoke "RestFn.java" 408]
   [clojure.core$load_one invokeStatic "core.clj" 5933]
   [clojure.core$load_one invoke "core.clj" 5928]
   [clojure.core$load_lib$fn__6850 invoke "core.clj" 5975]
   [clojure.core$load_lib invokeStatic "core.clj" 5974]
   [clojure.core$load_lib doInvoke "core.clj" 5953]
   [clojure.lang.RestFn applyTo "RestFn.java" 142]
   [clojure.core$apply invokeStatic "core.clj" 669]
   [clojure.core$load_libs invokeStatic "core.clj" 6016]
   [clojure.core$load_libs doInvoke "core.clj" 6000]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.core$apply invokeStatic "core.clj" 669]
   [clojure.core$require invokeStatic "core.clj" 6038]
   [clojure.core$require doInvoke "core.clj" 6038]
   [clojure.lang.RestFn invoke "RestFn.java" 421]
   [gravity.gui$eval1048$loading__6789__auto____1049
    invoke
    "gui.clj"
    20]
   [gravity.gui$eval1048 invokeStatic "gui.clj" 20]
   [gravity.gui$eval1048 invoke "gui.clj" 20]
   [clojure.lang.Compiler eval "Compiler.java" 7194]
   [clojure.lang.Compiler eval "Compiler.java" 7183]
   [clojure.lang.Compiler load "Compiler.java" 7653]
   [clojure.lang.RT loadResourceScript "RT.java" 381]
   [clojure.lang.RT loadResourceScript "RT.java" 372]
   [clojure.lang.RT load "RT.java" 459]
   [clojure.lang.RT load "RT.java" 424]
   [clojure.core$load$fn__6908 invoke "core.clj" 6161]
   [clojure.core$load invokeStatic "core.clj" 6160]
   [clojure.core$load doInvoke "core.clj" 6144]
   [clojure.lang.RestFn invoke "RestFn.java" 408]
   [clj_check.check$check_ns invokeStatic "check.clj" 15]
   [clj_check.check$check_ns invoke "check.clj" 9]
   [clojure.core$map$fn__5931$fn__5932 invoke "core.clj" 2759]
   [clojure.lang.TransformerIterator
    step
    "TransformerIterator.java"
    79]
   [clojure.lang.TransformerIterator
    hasNext
    "TransformerIterator.java"
    97]
   [clojure.lang.RT chunkIteratorSeq "RT.java" 517]
   [clojure.core$sequence invokeStatic "core.clj" 2679]
   [clojure.core$sequence invoke "core.clj" 2664]
   [clj_check.check$check invokeStatic "check.clj" 25]
   [clj_check.check$check invoke "check.clj" 19]
   [clj_check.check$_main invokeStatic "check.clj" 33]
   [clj_check.check$_main doInvoke "check.clj" 32]
   [clojure.lang.RestFn invoke "RestFn.java" 397]
   [clojure.lang.AFn applyToHelper "AFn.java" 152]
   [clojure.lang.RestFn applyTo "RestFn.java" 132]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.main$main_opt invokeStatic "main.clj" 514]
   [clojure.main$main_opt invoke "main.clj" 510]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]],
  :cause "Attempting to call unbound fn: #'fastmath.core/abs",
  :phase :execution}}

相关代码在这里:这里,可以通过在 deps.edn 中切换 Clojure 版本为 1.10.31.11.0,然后在命令行中执行 clj -M:check 来展示这个问题。

此外,这是在 OpenJDK 运行时环境 Temurin-17.0.2+8(构建 17.0.2+8)的 macOS 12.3(64位 Intel)上发生的,如果有帮助请告知。

4 个答案

+1

被选中
 
最佳答案

更简单的但足以重现的示例

clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.11.0"} clojure2d/clojure2d {:mvn/version "1.4.3"}}}'

;; then
(require '[clojure2d.core :as c2d] :verbose)

产生

user=> (require '[clojure2d.core :as c2d])
WARNING: abs already refers to: #'clojure.core/abs in namespace: fastmath.core, being replaced by: #'fastmath.core/abs
Warning: protocol #'fastmath.protocols/VectorProto is overwriting function abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: fastmath.protocols, being replaced by: #'fastmath.protocols/abs
Reflection warning, fastmath/kernel.clj:72:1 - call to static method divide on fastmath.java.PrimitiveMath can't be resolved (argument types: unknown, double).

.... large number of similar reflection warnings elided
... slf4j warnings elided

Execution error (IllegalStateException) at fastmath.stats$median_absolute_deviation$fn__2570/invokePrim (stats.clj:227).
Attempting to call unbound fn: #'fastmath.core/abs

更新到最新的 fastmath 版本似乎解决了绝对值碰撞问题。

clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.11.0"} clojure2d/clojure2d {:mvn/version "1.4.3"} generateme/fastmath {:mvn/version "2.1.6"}}}'

通常情况下,如果库中已经存在相同功能的函数,仅在核心库中添加新功能只会产生警告而不会报错。我认为这与fastmath.protocols声明了一个abs函数和fastmath.core中进行的变量交换有关。我目前还不能完全理解这些操作的序列,但最近在fastmath中添加的核心排除似乎避免了这个问题。

因此,在此处添加一个更具体的fastmath版本就足够修复这个问题了,但clojure2d也应该更新。

为clojure2d添加了问题:[https://github.com/Clojure2D/clojure2d/issues/19](https://github.com/Clojure2D/clojure2d/issues/19)
谢谢!在我等待Clojure2D更新的时候,我会强制使用新的fastmath版本。
完成了!已经发布了Fastmath 2.1.8和Clojure2d 1.4.4。
+1

编辑

感谢大家的调查。确实,我忽视了更新原始数学路径的排除列表。这已经在fastmath 2.1.8和Clojure2d 1.4.4中修复了。

$ clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.11.0"} clojure2d/clojure2d {:mvn/version "1.4.4"}}}'
Clojure 1.11.0
(require '[clojure2d.core :as c2d] '[clojure2d.color :as c])
nil
((c/gradient [:red :blue]) 0.5)
#vec4 [127.5, 0.0, 127.5, 255.0]
user=>
0

在 Clojure 1.10.3 中,以下命令会得到什么结果?

clj -Sforce -M:check

只想确保您在比较时没有使用缓存的类路径。这几乎好像有点依赖性问题。

此外,请发布以下内容

clj -X:deps tree :aliases ‘[:check]’

(您需要较新的 CLI 才能实现这一点)

by
修改 by
绝对确定这不是本地缓存问题,因为当我第一次听到这个问题时,项目升级到 Clojure 1.11 后,GitHub Action 失败了。

[edit] 确定 `clj -Sforce -M:check` 返回相同的错误。 以及 `clj -X:deps tree :aliases '[:check]'` 的输出

org.clojure/clojure 1.11.0
  . org.clojure/spec.alpha 0.3.218
  . org.clojure/core.specs.alpha 0.2.62
clojure2d/clojure2d 1.4.3
  . generateme/fastmath 2.1.5
    . net.jafama/jafama 2.3.1
    . org.apache.commons/commons-math3 3.6.1
    . com.github.haifengl/smile-interpolation 2.6.0
      . com.github.haifengl/smile-math 2.6.0
        X org.slf4j/slf4j-api 1.7.30 :older-version
    . com.github.haifengl/smile-core 2.6.0
      . com.github.haifengl/smile-data 2.6.0
        . com.github.haifengl/smile-math 2.6.0
      . com.github.haifengl/smile-math 2.6.0
        . com.github.haifengl/smile-graph 2.6.0
        . com.github.haifengl/smile-math 2.6.0
    . com.github.haifengl/smile-mkl 2.6.0
      . com.github.haifengl/smile-math 2.6.0
        . org.bytedeco/mkl-platform 2020.3-1.5.4
        . org.bytedeco/javacpp-platform 1.5.4
        . org.bytedeco/mkl 2020.3-1.5.4
          . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/mkl$linux-x86 2020.3-1.5.4
          . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/mkl$linux-x86_64 2020.3-1.5.4
          . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/mkl$macosx-x86_64 2020.3-1.5.4
          . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/mkl$windows-x86 2020.3-1.5.4
          . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/mkl$windows-x86_64 2020.3-1.5.4
          . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/mkl-platform-redist 2020.3-1.5.4
        . org.bytedeco/mkl-platform 2020.3-1.5.4
        . org.bytedeco/mkl$linux-x86-redist 2020.3-1.5.4
          . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/mkl$linux-x86_64-redist 2020.3-1.5.4
          . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/mkl$macosx-x86_64-redist 2020.3-1.5.4
          . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/mkl$windows-x86-redist 2020.3-1.5.4
          . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/mkl$windows-x86_64-redist 2020.3-1.5.4
          . org.bytedeco/javacpp 1.5.4
    . org.bytedeco/arpack-ng 3.7.0-1.5.4
      . org.bytedeco/openblas 0.3.10-1.5.4
      . org.bytedeco/javacpp 1.5.4
    . org.bytedeco/arpack-ng-platform 3.7.0-1.5.4
      . org.bytedeco/openblas-platform 0.3.10-1.5.4
      . org.bytedeco/arpack-ng 3.7.0-1.5.4
        . org.bytedeco/arpack-ng$linux-x86 3.7.0-1.5.4
        . org.bytedeco/openblas 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/arpack-ng$linux-x86_64 3.7.0-1.5.4
        . org.bytedeco/openblas 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/arpack-ng$linux-armhf 3.7.0-1.5.4
        . org.bytedeco/openblas 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/arpack-ng$linux-arm64 3.7.0-1.5.4
        . org.bytedeco/openblas 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/arpack-ng$linux-ppc64le 3.7.0-1.5.4
        . org.bytedeco/openblas 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/arpack-ng$macosx-x86_64 3.7.0-1.5.4
        . org.bytedeco/openblas 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/arpack-ng$windows-x86 3.7.0-1.5.4
        . org.bytedeco/openblas 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/arpack-ng$windows-x86_64 3.7.0-1.5.4
        . org.bytedeco/openblas 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
      . org.bytedeco/openblas 0.3.10-1.5.4
      . org.bytedeco/javacpp 1.5.4
      . org.bytedeco/openblas-platform 0.3.10-1.5.4
        . org.bytedeco/javacpp-platform 1.5.4
        . org.bytedeco/javacpp 1.5.4
          . org.bytedeco/javacpp$android-arm 1.5.4
          . org.bytedeco/javacpp$android-arm64 1.5.4
          . org.bytedeco/javacpp$android-x86 1.5.4
          . org.bytedeco/javacpp$android-x86_64 1.5.4
          . org.bytedeco/javacpp$ios-arm64 1.5.4
          . org.bytedeco/javacpp$ios-x86_64 1.5.4
          . org.bytedeco/javacpp$linux-armhf 1.5.4
          . org.bytedeco/javacpp$linux-arm64 1.5.4
          . org.bytedeco/javacpp$linux-ppc64le 1.5.4
          . org.bytedeco/javacpp$linux-x86 1.5.4
          . org.bytedeco/javacpp$linux-x86_64 1.5.4
          . org.bytedeco/javacpp$macosx-x86_64 1.5.4
          . org.bytedeco/javacpp$windows-x86 1.5.4
          . org.bytedeco/javacpp$windows-x86_64 1.5.4
      . org.bytedeco/openblas 0.3.10-1.5.4
        . org.bytedeco/openblas$android-arm 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$android-arm64 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$android-x86 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$android-x86_64 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$ios-arm64 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$ios-x86_64 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$linux-x86 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$linux-x86_64 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$linux-armhf 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$linux-arm64 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$linux-ppc64le 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$macosx-x86_64 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$windows-x86 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
        . org.bytedeco/openblas$windows-x86_64 0.3.10-1.5.4
        . org.bytedeco/javacpp 1.5.4
      . org.bytedeco/javacpp 1.5.4
      . de.sciss/jwave 1.0.3
        . ca.umontreal.iro.simul/ssj 3.3.1
        . jfree/jfreechart 1.0.12
          . jfree/jcommon 1.0.15
          . colt/colt 1.2.0
          . concurrent/concurrent 1.3.4
          . com.github.rwl/optimization 1.3
          . org.apache.commons/commons-math3 3.6.1
          . org.apache.xmlgraphics/batik-transcoder 1.14
          . org.apache.xmlgraphics/batik-anim 1.14
             . org.apache.xmlgraphics/batik-awt-util 1.14
             . org.apache.xmlgraphics/batik-css 1.14
               . org.apache.xmlgraphics/batik-shared-resources 1.14
               . org.apache.xmlgraphics/batik-util 1.14
                . org.apache.xmlgraphics/xmlgraphics-commons 2.6
                 . xml-apis/xml-apis-ext 1.3.04
                 . org.apache.xmlgraphics/batik-dom 1.14
                 . org.apache.xmlgraphics/batik-ext 1.14
               . org.apache.xmlgraphics/batik-shared-resources 1.14
                 . org.apache.xmlgraphics/batik-parser 1.14
        . org.apache.xmlgraphics/batik-awt-util 1.14
               . org.apache.xmlgraphics/batik-shared-resources 1.14
               . org.apache.xmlgraphics/batik-util 1.14
        . org.apache.xmlgraphics/batik-xml 1.14
                 . xml-apis/xml-apis-ext 1.3.04
      . org.apache.xmlgraphics/batik-shared-resources 1.14
      . org.apache.xmlgraphics/batik-svg-dom 1.14
        . org.apache.xmlgraphics/batik-awt-util 1.14
        . org.apache.xmlgraphics/batik-css 1.14
        . org.apache.xmlgraphics/batik-dom 1.14
        . org.apache.xmlgraphics/batik-ext 1.14
        . org.apache.xmlgraphics/batik-parser 1.14
               . org.apache.xmlgraphics/batik-shared-resources 1.14
               . org.apache.xmlgraphics/batik-util 1.14
                 . xml-apis/xml-apis-ext 1.3.04
      . org.apache.xmlgraphics/batik-util 1.14
      . xml-apis/xml-apis-ext 1.3.04
    . org.apache.xmlgraphics/batik-awt-util 1.14
      . org.apache.xmlgraphics/batik-shared-resources 1.14
      . org.apache.xmlgraphics/batik-util 1.14
        . org.apache.xmlgraphics/xmlgraphics-commons 2.6
        . commons-io/commons-io 1.3.1
        . commons-logging/commons-logging 1.0.4
    . org.apache.xmlgraphics/batik-bridge 1.14
        . org.apache.xmlgraphics/batik-anim 1.14
             . org.apache.xmlgraphics/batik-awt-util 1.14
             . org.apache.xmlgraphics/batik-css 1.14
                 . org.apache.xmlgraphics/batik-dom 1.14
        . org.apache.xmlgraphics/batik-gvt 1.14
                 . org.apache.xmlgraphics/batik-parser 1.14
        . org.apache.xmlgraphics/batik-script 1.14
        . org.apache.xmlgraphics/batik-anim 1.14
               . org.apache.xmlgraphics/batik-shared-resources 1.14
               . org.apache.xmlgraphics/batik-util 1.14
      . org.apache.xmlgraphics/batik-shared-resources 1.14
      . org.apache.xmlgraphics/batik-svg-dom 1.14
      . org.apache.xmlgraphics/batik-util 1.14
        . org.apache.xmlgraphics/batik-xml 1.14
        . org.apache.xmlgraphics/xmlgraphics-commons 2.6
      . xml-apis/xml-apis-ext 1.3.04
    . org.apache.xmlgraphics/batik-dom 1.14
             . org.apache.xmlgraphics/batik-css 1.14
                 . org.apache.xmlgraphics/batik-ext 1.14
      . org.apache.xmlgraphics/batik-shared-resources 1.14
      . org.apache.xmlgraphics/batik-util 1.14
        . org.apache.xmlgraphics/batik-xml 1.14
        . xalan/xalan 2.7.2
        . xalan/serializer 2.7.2
          X xml-apis/xml-apis 1.3.04 :older-version
        . xml-apis/xml-apis 1.4.01
      . xml-apis/xml-apis-ext 1.3.04
    . org.apache.xmlgraphics/batik-gvt 1.14
             . org.apache.xmlgraphics/batik-awt-util 1.14
      . org.apache.xmlgraphics/batik-shared-resources 1.14
      . org.apache.xmlgraphics/batik-util 1.14
    . org.apache.xmlgraphics/batik-shared-resources 1.14
    . org.apache.xmlgraphics/batik-svggen 1.14
             . org.apache.xmlgraphics/batik-awt-util 1.14
      . org.apache.xmlgraphics/batik-shared-resources 1.14
      . org.apache.xmlgraphics/batik-util 1.14
    . org.apache.xmlgraphics/batik-util 1.14
        . org.apache.xmlgraphics/batik-constants 1.14
               . org.apache.xmlgraphics/batik-shared-resources 1.14
        . org.apache.xmlgraphics/batik-i18n 1.14
               . org.apache.xmlgraphics/batik-shared-resources 1.14
      . org.apache.xmlgraphics/batik-shared-resources 1.14
    . org.apache.xmlgraphics/batik-xml 1.14
      . org.apache.xmlgraphics/batik-shared-resources 1.14
      . org.apache.xmlgraphics/batik-util 1.14
    . xml-apis/xml-apis-ext 1.3.04
org.clojure/math.combinatorics 0.1.6
ch.qos.logback/logback-classic 1.2.11
  . ch.qos.logback/logback-core 1.2.11
  . org.slf4j/slf4j-api 1.7.32
com.github.athos/clj-check https://github.com/athos/clj-check.git 518d5a1
  . timofreiberg/bultitude 0.3.1
    . org.clojure/java.classpath 0.3.0
0

clj-check 会无条件加载可能已经加载过的代码,这可能导致这种行为。可能切换 clojure 版本会改变加载顺序。

理想情况下,clj-check 应该使用 require 而不是 load(因为它已经从命名空间开始),以避免任何类型的重复加载。

Fastmath 进行了一些操作(https://github.com/generateme/fastmath/blob/master/src/fastmath/core.clj#L1364),这会使它对重复加载非常敏感。

我注意到在 fastmath 中的 `vars-to-exclude` 不包括 `abs`,而 `abs` 现在在 1.11 版本的 clojure.core 中已存在。
...