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

欢迎!有关本网站的更多详情,请访问关于 页面。

0
tools.deps
如果你已经在使用 logback,并且有一个 logback.xml(可能是从 stuartsierra/log.dev 这样的库中获取的),由于 tools.deps 通过 aws-maven 递归地引入 logback.xml,你将会收到很多警告。

{code:title=deps.edn}
{:deps {org.clojure/tools.deps.alpha {:mvn/version "0.5.460"}}}



❯ clojure -e '(clojure.java.io/resource "logback.xml")'
#object[java.net.URL 0x1c852c0f "jar:file:/home/dominic/.m2/repository/org/springframework/build/aws-maven/5.0.0.RELEASE/aws-maven-5.0.0.RELEASE.jar!/logback.xml"]


我不知道你还能做什么,除了分支上游。

冲突发生的示例

{code:title=deps.edn}
{:deps {org.clojure/tools.deps.alpha {:mvn/version "0.5.460"
                                      :exclusions [org.slf4j/slf4j-nop]}
        com.stuartsierra/log.dev {:mvn/version "0.2.0"}
        org.clojure/tools.logging {:mvn/version "0.4.1"}}}



$ echo "(require 'clojure.tools.logging)  (clojure.tools.logging/info :hello)" | clojure
...
12:27:29,975 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
12:27:29,975 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/home/dominic/.m2/repository/org/springframework/build/aws-maven/5.0.0.RELEASE/aws-maven-5.0.0.RELEASE.jar!/logback.xml]
12:27:29,975 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/home/dominic/.m2/repository/com/stuartsierra/log.dev/0.2.0/log.dev-0.2.0.jar!/logback.xml]
...

1 答案

0
参考:https://clojure.atlassian.net/browse/TDEPS-108(由severeoverfl0w报告)
...