没有方法的实现:协议的协议文件:#'clojure.java.io/Coercions 在 leiningen 项目文件中找到 class: java.lang.Character

No implementation of method: :as-file of protocol: #'clojure.java.io/Coercions found for class: java.lang.Character in leiningen project file

我正在尝试使用 leiningen 创建一个多目标项目,所以我让它生成了多个不同的 jar 文件,这是我创建的项目文件:

(defproject linuxmisc "0.1.0-SNAPSHOT"
    :main void.install

    :dependencies [
        [org.clojure/clojure "1.10.1"]]
    
    :resource-path "resources/"
    :target-path "output/%s"
    
    :jvm-opts ["-Dclojure.compiler.direct-linking=true"]
    
    :profiles {
        :void {
            :aot :all
            :main void.install
            :source-path "src/"}
        :nixos {
            :aot :all
            :main nixos.preinstall
            :source-path "src/"}
        :artix {
            :aot :all
            :main artix.preinstall
            :source-path "src/"}}
)

它一直返回错误,我无法弄清楚它到底出了什么问题

我没有看到那个错误。我的文件版本:

 > tree
.
├── project.clj
├── src
│   └── demo
│       └── core.clj
└── test
    └── demo
        └── core_test.clj
> cat project.clj 
(defproject linuxmisc "0.1.0-SNAPSHOT"
  :main demo.core
  :dependencies [[org.clojure/clojure "1.10.1"]]

  :resource-path "resources/"
  :target-path "output/%s"

  :jvm-opts ["-Dclojure.compiler.direct-linking=true"]

  :profiles {
             :void {
                    :aot :all
                    :main void.install
                    :source-path "src/"}
             :nixos {
                     :aot :all
                     :main nixos.preinstall
                     :source-path "src/"}
             :artix {
                     :aot :all
                     :main artix.preinstall
                     :source-path "src/"}}

和代码

(ns demo.core
  )

(defn -main
  "I don't do a whole lot ... yet."
  [& args]
  (println "-main - enter")
  )
(ns demo.core-test
  (:use clojure.test))

(deftest ttt
  (println "testing...")
  (is true))

结果:

> lein clean; lein run
-main - enter


> lein clean; lein test

lein test demo.core-test
testing...

Ran 1 tests containing 1 assertions.
0 failures, 0 errors.

``

I'm guessing something weird is happening with your `void.install`, `nixos.preinstall`, or `artix.preinstall` items.  Those don't look like namespaces....?