This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-02
Channels
- # announcements (3)
- # asami (29)
- # babashka (62)
- # beginners (131)
- # biff (7)
- # calva (31)
- # cider (5)
- # clerk (14)
- # clj-kondo (3)
- # cljsrn (12)
- # clojars (18)
- # clojure (72)
- # clojure-austin (17)
- # clojure-dev (6)
- # clojure-europe (31)
- # clojure-indonesia (1)
- # clojure-nl (1)
- # clojure-norway (18)
- # clojure-sweden (11)
- # clojure-uk (6)
- # clr (47)
- # conjure (42)
- # cursive (88)
- # datalevin (2)
- # datomic (25)
- # emacs (42)
- # exercism (1)
- # fulcro (10)
- # funcool (8)
- # gratitude (2)
- # honeysql (16)
- # introduce-yourself (5)
- # jobs-discuss (26)
- # leiningen (5)
- # lsp (31)
- # malli (21)
- # matcher-combinators (14)
- # missionary (2)
- # nbb (1)
- # off-topic (40)
- # pathom (38)
- # portal (2)
- # re-frame (7)
- # reagent (18)
- # reitit (1)
- # releases (5)
- # shadow-cljs (62)
- # sql (12)
- # testing (4)
- # xtdb (37)
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?
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
Another option is adding nrepl
as a dependency - then manually starting from inside your plugin code.
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
. :thinking_face:
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 😉