leiningen

jeongsoolee09 2023-02-02T04:49:23.940399Z

I am trying to write a lein plugin, and for testing this I made a mock target project. However, rather than going through a conventional write-compile-test cycle I would like to develop it on the REPL, just I would develop a regular Clojure application. How can I achieve this?

Rupert (Sevva/All Street) 2023-02-03T08:54:15.456379Z

Another option is adding nrepl as a dependency - then manually starting from inside your plugin code.

vemv 2023-02-02T07:15:59.468299Z

You could try adding leiningen-core as a vanilla dependency Although I think it will be hard to reproduce all the things Lein does for you e.g. evaluate projects, merge aliases, etc I had a good experience simply separating the plugin from the 'core', and developing that core in a vanilla fashion

πŸ‘ 1
πŸ‘€ 1
jeongsoolee09 2023-02-05T17:03:10.026149Z

After some days of contemplation, I decided to develop the core logic independently (on the REPL), and then slap that into leiningen.core/eval-in-project. πŸ€”

eskos 2023-02-09T11:39:00.769489Z

I’ve also done the separated core approach and it works quite well for me; https://github.com/esuomi/git-revisions-lein/blob/master/src/lein_git_revisions/plugin.clj for my https://github.com/esuomi/git-revisions and as you can see, it doesn’t need much to work. I am aware I use the deprecated plugin registration method, PRs welcome πŸ˜‰

πŸ‘ 1
πŸ‘€ 1