在 Slime 中加载新的依赖项? [英] load a new dependency in slime?
问题描述
我正在使用 emacs 和 swank-clojure.我如何解决以下情况 -
I am using emacs and swank-clojure. How do I resolve the below scenario -
- 我向 project.clj 添加了一个新的依赖项.
- 我在 shell 中运行 lein deps 以获取新的 dep.
- 我有一个已打开的现有 Slime 会话,我想使用新部门的功能.
如何让现有的 slime 会话加载新的依赖项?
How do I get the existing slime session to load the new dependency ?
谢谢,穆尔塔扎
推荐答案
你应该看看 pomegranatea> 旨在提供与您描述的功能相似(如果不完全相同)的功能.
You should have a look at pomegranate which is designed to provide similar if not identical capabilities as the one you describe.
正如评论中 @gergek 所指出的,leiningen2
与 一起提供pomegranate
,所以如果你在 lein2 上,你必须在 Slime REPL 中触发类似下面的代码:
As pointed out by @gergek in the comments, leiningen2
ships with pomegranate
, so that if you're on lein2 you have to just fire something like the following in the slime REPL:
(require '[cemerick.pomegranate :as p])
(p/add-dependencies :coordinates '[[org.clojure/core.logic "0.7.5"]])
看看add-dependencies
docs 以获取有关如何使用它的更多信息.
Have a look at add-dependencies
docs for more info on how to use it.
这篇关于在 Slime 中加载新的依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!