How can I set up leiningen to work with multiple projects?

前端 未结 2 707
忘掉有多难
忘掉有多难 2020-12-08 15:54

I have multiple, separate leiningen projects that ostensibly could depend on one-another.

Example:

~/projects/mywebapp  (my own project)
~/projects/         


        
相关标签:
2条回答
  • 2020-12-08 16:20

    If you're already using swank, you don't need lein checkout dependencies. You can just C-c C-k your project (which will load the jarred versions of noir/whatever), and then browse to your local version of noir and C-c C-k that as well. Swank happily sends all the code to your repl, and the jvm never need know that it came from a different place!

    I can only recommend this for smallish changes though, because I think if you compile noir.core, which depends on (say) noir.internal, clojure will load the jarred version of noir.internal even while you compile the local version of noir.core. Even so, it's a handy trick in general.

    0 讨论(0)
  • 2020-12-08 16:32

    Does this question from the Lein FAQ help?

    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.

    0 讨论(0)
提交回复
热议问题