启动-clj显示了许多关于启动时版本冲突的警告:它们如下所示:
Warning: version conflict detected: org.clojure/clojure version changes from 1.5.1 to 1.8.0
Warning: version conflict detected: clj-time version changes from 0.8.0 to 0.12.0
Warning: version conflict detected: riddley version changes from 0.1.7 to 0.1.12
Warning: version conflict detected: org.codehaus.plexus/plexus-utils version changes from 2.0.7 to 2.0.6
Warning: version conflict detected: org.clojure/tools.namespace version changes from 0.2.11 to 0.2.10
Warning: version conflict detected: com.fasterxml.jackson.core/jackson-core version changes from 2.1.1 to 2.3.2我不太明白为什么有时第一个版本比另一个版本低,有时相反。看来我也无法影响他们中的大多数人。例如,在我的项目中,我需要clj-time版本的0.12.0,所以我想警告来自一个库,它本身需要在另一个版本中使用clj时间。
是否有方法修复它们,或者我是否总是使用-q标志来“抑制来自引导本身的输出”?这可能会阻止其他可能更重要的输出被显示吗?
发布于 2016-10-08 21:01:49
示例:
文件/tmp/stackoverflow/boot.build
(set-env! :dependencies '[[clj-time "0.12.0"]
[joda-time "2.9.4"]])在终点站:
Borkdude@MBP /tmp/stackoverflow $ boot show -d
Warning: version conflict detected: joda-time version changes from 2.9.3 to 2.9.4
Warning: version conflict detected: joda-time version changes from 2.9.3 to 2.9.4
[clj-time "0.12.0"]
└── [org.clojure/clojure "1.8.0"]
[joda-time "2.9.4"]
Borkdude@MBP /tmp/stackoverflow $ boot show -p
Warning: version conflict detected: joda-time version changes from 2.9.3 to 2.9.4
Warning: version conflict detected: joda-time version changes from 2.9.3 to 2.9.4
[✔] joda-time
✔ 2.9.4
joda-time
✘ 2.9.3
clj-time因此,boot show -d将告诉您有效的传递依赖树。boot show -p将给出更多关于冲突的细节。这里它告诉我们,对joda-time的依赖牵扯到joda-time 2.9.4,但它与clj-time想要引入joda-time 2.9.3相冲突。
假设我们不直接依赖joda-time,而是依赖于其他库foo,这依赖于joda-time 2.9.4。然后,我们可以使用clj-time:[clj-time "0.12.0" :exclusions [joda-time]]上的排除来在我们的项目中不带警告地获取2.9.4,从而消除这个警告。
https://stackoverflow.com/questions/39935868
复制相似问题