重现
(! 748)-> cat deps.edn
{:deps {org.clojure/data.csv {:mvn/version "RELEASE"}}}
(! 749)-> cat src/foo.clj
(ns foo
"Example namespace."
(:require [clojure.data.csv :as csv]))
(defn bar "Example function" [_] (println "Baaa!"))
(! 750)-> clojure -X foo/bar
Baaa!
(! 751)-> clojure -X:deps help/doc :fn foo/bar
Syntax error (FileNotFoundException) compiling at (foo.clj:1:1).
Could not locate clojure/data/csv__init.class, clojure/data/csv.clj or clojure/data/csv.cljc on classpath.
Full report at:
/var/folders/p1/30gnjddx6p193frh670pl8nh0000gn/T/clojure-12591734153756667401.edn
因为-X:deps
替换了项目依赖,只有src
文件被找到(因为:paths
没有被替换)。