【发布时间】:2018-07-07 01:11:37
【问题描述】:
这是针对与How to change Clojure or Lein's Clojure default version?相同的问题寻求帮助
但不是该问题的答案。我是否应该在该线程下将其写为答案?
指定在项目目录之外发出“(lein repl)”命令时要使用的 Clojure 版本似乎是很自然的事情。当然不允许这样做可能有很好的设计原因,但是你认为像下面这样的错误消息吗,
当 Leiningen 检测到 ~/.lein/profiles.clj(或其他相关配置文件)指定与硬编码到 Leiningen 中的不同的 Clojure 版本时显示,
会是个好主意吗?
"specifying the Clojure version to be used with certain software, such as tools.nrepl and clojure-complete, is only allowed when this command is issued within a project directory"
显然,很多人在 Stack Overflow 上花费了很多时间,试图找出如何做到这一点。
参考资料:
“将 ~/.lein/profiles.clj 更新为 {:repl {:dependencies [^:displace [org.clojure/clojure "1.9.0"]]}} 似乎不起作用。 – Petrus塞隆 2018 年 1 月 10 日 9:05" How do you change Clojure version in Leiningen and LightTable?
“我刚才在 IRC 上询问了技术专家。他说:“REPL 的外部项目被硬编码为 lein 的 clojure 版本”。- David J. 2014 年 2 月 24 日 19:52“How to change Clojure or Lein's Clojure default version?
“这个 ^:displace 技巧不适用于 tools.nrepl 或 clojure-complete。” https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md
【问题讨论】:
-
这对我来说并不像是一个问题......如果你想建议对 Leiningen 进行更改,你可以在 Leiningen 问题跟踪器上这样做,不是吗?
-
@glts 好主意。我在github.com/technomancy/leiningen/issues/2394将其称为“Friendlier Leiningen watch for issues and warns”的问题你认为我应该现在结束这个问题吗?