nrepl

2022-12-09T11:36:15.191319Z

hey folks, quick question

2022-12-09T11:37:41.615649Z

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

2022-12-09T11:37:44.728639Z

: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))"]}

dpsutton 2022-12-09T14:01:37.674569Z

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

2022-12-09T14:03:15.781189Z

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

2022-12-09T14:03:22.767049Z

Thx!

2022-12-09T11:38:53.207709Z

any hints why this isn’t working?