Fork me on GitHub
#nrepl
<
2022-12-09
>
dev-hartmann11:12:15

hey folks, quick question

dev-hartmann11:12:41

I created this alias in my deps.edn to start portal, but the code inside the :main-opts “-e” will not be called

dev-hartmann11:12:44

:portal {:extra-deps {cider/cider-nrepl {:mvn/version "0.28.5"}
                                 djblue/portal     {:mvn/version "0.35.0"}}
                    :main-opts ["-m" "nrepl.cmdline"
                                "--middleware" "[portal.nrepl/wrap-portal, cider.nrepl/cider-middleware]"
                                "-e" "(require,'[portal.api,:as,p]),(def,p,(p/open))"]}

dpsutton14:12:37

clojure.main understands an option -e https://github.com/clojure/clojure/blob/master/src/clj/clojure/main.clj#L499 But you aren’t calling this main entry point, you are calling nrepl.cmdline which doesn’t support that option

dev-hartmann14:12:15

Ah, i See. So i have to manually load that code later.

dev-hartmann11:12:53

any hints why this isn’t working?