load a new dependency in slime?

拈花ヽ惹草 提交于 2019-12-30 06:57:26

问题


I am using emacs and swank-clojure. How do I resolve the below scenario -

  1. I have added a new dependency to project.clj.
  2. I run lein deps in a shell to get the new dep.
  3. I have an existing slime session that is open and want to use a function from the new dep.

How do I get the existing slime session to load the new dependency ?

Thanks, Murtaza


回答1:


You should have a look at pomegranate which is designed to provide similar if not identical capabilities as the one you describe.

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"]])

Have a look at add-dependencies docs for more info on how to use it.



来源:https://stackoverflow.com/questions/11327624/load-a-new-dependency-in-slime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!