gpt4 book ai didi

clojure - 使用 swank-clojure 攻击 Clojure 库的工作流程

转载 作者:行者123 更新时间:2023-12-02 13:58:11 25 4
gpt4 key购买 nike

攻击 Clojure 库有典型的工作流程吗?

假设我的应用程序“Foo”依赖于第三方库“Bar”,该库是从存储库获取的,并通过 lein deps 包含在项目 Foo 中。

然后,假设我想破解“Bar”库,所以我从 github 克隆它。

现在,我想破解我的本地克隆“Bar”,同时处理依赖于它的应用程序“Foo”。我希望使用一个 swank 实例在 Emacs 中打开“Bar”的所有源文件以及“Foo”中的所有源文件。

有没有简单的方法可以做到这一点?

我想改变我的环境而不是项目。因此,我不想编辑“Foo”的project.clj来完成此任务。

这是否需要在启动lein swank之前设置类路径,或者有更好的方法吗?

最佳答案

在 Foo 项目中创建一个 checkouts 目录,并在该目录中创建指向 Bar 项目克隆的符号链接(symbolic link)。

引用Leiningen FAQ :

Q: I want to hack two projects in parallel, but it's annoying to switch between them.
A: 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, and the copy in checkouts will take precedence over the dependency declared in project.clj. Note that this is not a replacement for listing the project in :dependencies; it simply supplements that for convenience.

关于clojure - 使用 swank-clojure 攻击 Clojure 库的工作流程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8846706/

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