Clojure:profiles.clj在使用苹果酒时在某些项目中没有得到荣誉



我面临着与 https://stackoverflow.com/a/25401281/4329629 年最后一条评论中提到的相同问题(由Yu Shen)

我不知道为什么要添加:p lugins [[苹果酒/苹果酒-nrepl "0.7.0"]] ~/.lein/profiles.clj 不起作用。但同样的表达::p卢金斯 [[苹果酒/苹果酒-nrepl "0.7.0"]] 在我的项目.clj 工作 不出所料。

到目前为止,我认为我的所有项目都是这样运行的,但今天我发现了一些不同的东西。也许是出了什么问题的提示?行为不同的 2 个项目具有以下结构:

=====================

project-1/project.clj (苹果酒不起作用) ===

===================
(defproject clj "0.1.0-SNAPSHOT"
  :description "Frontend for stox@gryffin"
  :url "http://stox.gryff.in/"
  :dependencies [[selmer "0.6.9"]
                 [clj-time "0.6.0"]
                 [http-kit "2.1.18"]
                 [com.taoensso/timbre "3.2.1"]
                 [noir-exception "0.2.2"]
                 [im.chit/cronj "1.4.3"]
                 [environ "1.0.0"]
                 [org.clojure/tools.nrepl "0.2.3"]
                 [clojure-complete "0.2.4"]
                 [org.clojure/clojure "1.6.0"]
                 [org.clojure/data.json "0.2.5"]
                 [ring-server "0.3.1"]
                 [com.taoensso/tower "2.0.2"]
                 [com.novemberain/monger "2.0.0"]
                 [org.clojure/math.numeric-tower "0.0.4"]
                 [lib-noir "0.8.4"]]
  :jvm-opts ["-Xmx512m" "-Xms128m"]
  :plugins [[lein-environ "1.0.0"]]
  :main clj.core)
======================

project-2/project.clj (苹果酒作品) ===

=================
(defproject project-euler "0.1.0-SNAPSHOT"
  :description "Solve problems on project-euler website"
  :url "http://projecteuler.net/problems"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/core.memoize "0.5.6"]
                 [expectations "2.0.13"]
                 [org.clojure/math.numeric-tower "0.0.4"]
                 [org.clojure/math.combinatorics "0.0.8"]
                 [criterium "0.4.3"]
                 [org.clojure/tools.trace "0.7.8"]
                 [com.taoensso/timbre "3.2.1"]]
  :plugins [[lein-autoexpect "1.0"]])
================== ~/.

lein/profiles.clj ===

====================
{:user {:plugins [[cider/cider-nrepl "0.9.0-SNAPSHOT"]]}}

编辑:1. 在项目-1 的苹果酒中看到错误消息

; CIDER 0.9.0alpha (package: 20150114.512) (Java 1.7.0_55, Clojure 1.6.0, nREPL 0.2.6)
WARNING: The following required nREPL ops are not supported: 
apropos classpath complete eldoc info inspect-start inspect-refresh inspect-pop inspect-push inspect-reset macroexpand ns-list ns-vars resource stacktrace toggle-trace-var toggle-trace-ns undef
Please, install (or update) cider-nrepl 0.9.0-SNAPSHOT and restart CIDER
WARNING: CIDER's version (0.9.0-snapshot) does not match cider-nrepl's version (not installed)
  1. (剪裁) 莱因 :树

    警告 [苹果酒/苹果酒-NREPL "0.9.0-20150118.121230-2"] [cljs-tooling "0.1.3" :exclusions [[org.clojure/clojure]]] [赞美 "0.2.1-20141130.115631-1" :排除项 [[org.clojure/clojure]]] [弃用"0.1.1"] [org.clojure/java.classpath "0.2.0" :exclusions [[org.clojure/clojure]]] [org.clojure/tools.trace "0.7.8" :exclusions [[org.clojure/clojure]]] [org.tcrawley/dynapath "0.2.3" :exclusions [[org.clojure/clojure

  2. ]]]
$ lein version
Leiningen 2.5.1 on Java 1.8.0_25 OpenJDK 64-Bit Server VM

我的~/.lein/profiles.clj

{:user {:plugins [[cider/cider-nrepl "0.9.0-SNAPSHOT"]]
        :dependencies [[org.clojure/tools.nrepl "0.2.7"]]}}

(完全按照 https://stackoverflow.com/a/15172955/1047788 建议)

在空目录中运行lein repl

$ lein repl
nREPL server started on port 40595 on host 127.0.0.1 - nrepl://127.0.0.1:40595
REPL-y 0.3.5, nREPL 0.2.6
Clojure 1.6.0
OpenJDK 64-Bit Server VM 1.8.0_25-b18
Docs: (doc function-name-here)

使用 lein new app; cd app 创建项目后

$ lein repl
Retrieving org/clojure/clojure/1.6.0/clojure-1.6.0.jar from central
nREPL server started on port 55421 on host 127.0.0.1 - nrepl://127.0.0.1:55421
REPL-y 0.3.5, nREPL 0.2.7
Clojure 1.6.0

我倾向于相信这可能是莱宁根的一些错误的表现,但我不确定......(为什么要下载Clojure?

2021 年 5 月更新

~/.lein/profiles.clj文件更改为以下内容:

{:user {:plugins [[cider/cider-nrepl "0.26.0-SNAPSHOT"]]
        :dependencies [[nrepl "0.8.3"]]}}

nrepl的依赖规范引用自 cider-nrepl Clojars 页面。

相关内容

  • 没有找到相关文章

最新更新