gpt4 book ai didi

clojure - 如何设置 leiningen 以处理多个项目?

转载 作者:行者123 更新时间:2023-12-03 12:50:28 24 4
gpt4 key购买 nike

我有多个独立的 leiningen 项目,这些项目表面上可能相互依赖。

例子:

~/projects/mywebapp  (my own project)
~/projects/noir (a clone of the github repo)
~/projects/clojureql (a clone of the github repo)

我想让它们同时编译到同一个 JVM 中。我想运行 git repos 前沿(拉新提交/进行我自己的提交),而不必运行 lein jar 或 lein deps,如果我更改任何项目,当然也不必重新启动 VM。

这是一个用例:

在 emacs 中运行 lein swank 后,我连接到 repl 并从 mywebapp 编译一个文件(使用 C-c-k),这需要一个来自 noir 的文件。它在我的项目目录中找到文件的版本。后来,我打开那个文件,编辑它,然后编译它(用 C-c-k)。

请注意,当我执行 git pull 时,我并没有要求自动编译。我只是不想重新启动 JVM 或进行冗长的 jar 编译过程。

这在莱宁根有可能吗?我该如何设置?

最佳答案

这个问题来自 Lein FAQ帮助?

Q: I want to hack two projects in parallel, but it's annoying to switch between them.

A: Use a feature called checkout dependencies. If you create a directory called checkouts in your project root and symlink some other project roots into it, Leiningen will allow you to hack on them in parallel. That means changes in the dependency will be visible in the main project without having to go through the whole install/switch-projects/deps/restart-repl cycle. Note that this is not a replacement for listing the project in :dependencies; it simply supplements that for tighter change cycles.

关于clojure - 如何设置 leiningen 以处理多个项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8335709/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com