leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
fabrao 2020-06-30T00:05:13.298400Z

Hello all, is it a lein template? https://github.com/mdiin/happlate

jacklombard 2020-06-30T20:41:29.303100Z

I want to deliver my application without source. I have done an aot all which converts all clj source files to .class files. But it still includes the project.clj which contains sensitive info and I need to exclude it. If I exclude it using uberjar-exclusions, I am not able to run the app and it says it can’t find project.clj. Why is project.clj required for me to execute the jar?

2020-06-30T20:43:08.303500Z

how are you running the resulting jar?

jacklombard 2020-06-30T20:43:59.304400Z

java -jar <myapp-snapshot-standalone.jar> <my-options>

2020-06-30T20:45:07.305100Z

do you get a stack trace on the project.clj error? I find it very strange that would be required

jacklombard 2020-06-30T20:46:23.305300Z

Caused by: java.io.FileNotFoundException: project.clj (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at <http://clojure.java.io|clojure.java.io>$fn__11466.invokeStatic(io.clj:229)
	at <http://clojure.java.io|clojure.java.io>$fn__11466.invoke(io.clj:229)
	at <http://clojure.java.io|clojure.java.io>$fn__11379$G__11372__11386.invoke(io.clj:69)
	at <http://clojure.java.io|clojure.java.io>$fn__11478.invokeStatic(io.clj:258)
	at <http://clojure.java.io|clojure.java.io>$fn__11478.invoke(io.clj:254)
	at <http://clojure.java.io|clojure.java.io>$fn__11379$G__11372__11386.invoke(io.clj:69)
	at <http://clojure.java.io|clojure.java.io>$fn__11440.invokeStatic(io.clj:165)
	at <http://clojure.java.io|clojure.java.io>$fn__11440.invoke(io.clj:165)
	at <http://clojure.java.io|clojure.java.io>$fn__11392$G__11368__11399.invoke(io.clj:69)
	at <http://clojure.java.io|clojure.java.io>$reader.invokeStatic(io.clj:102)
	at <http://clojure.java.io|clojure.java.io>$reader.doInvoke(io.clj:86)
	at clojure.lang.RestFn.invoke(RestFn.java:410)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$slurp.invokeStatic(core.clj:6942)
	at clojure.core$slurp.doInvoke(core.clj:6942)
	at clojure.lang.RestFn.invoke(RestFn.java:410)
	at cider.nrepl.version__init.load(Unknown Source)
	at cider.nrepl.version__init.&lt;clinit&gt;(Unknown Source)
	... 70 more

jacklombard 2020-06-30T20:46:58.306Z

I am pretty sure none my code requires project.clj itself

jacklombard 2020-06-30T20:48:02.307200Z

If I am in a folder that contains the required project.clj and run the jar from that directory it works, but that dissolves the whole point of having an independent jar

2020-06-30T20:53:55.308100Z

you shouldn't be including cider.nrepl in your uberjar

2020-06-30T20:54:06.308400Z

even if you want nrepl, don't use cider in prod

jacklombard 2020-06-30T21:01:35.309100Z

Okay will try removing cider.nrepl and try

jacklombard 2020-06-30T21:08:34.310Z

Wow, removing cider.nrepl worked, thanks a lot. Any reason why I shouldn’t be including cider.nrepl but can include nrepl?

2020-06-30T21:11:14.310600Z

cider is a development tool, that's why it needs to read your project.clj

2020-06-30T21:11:42.311300Z

it's useless if you aren't using it with the matching code in your editor

2020-06-30T21:12:29.312100Z

(on a team, it's just good etiquette not to force others to use things that are only there for your editor, IMHO)

2020-06-30T21:12:54.312700Z

Cider can be moved to your global dev config, or into a dev profile extending dev in your project

jacklombard 2020-06-30T21:16:32.315700Z

Okay, this is code I inherited and almost all the devs here use emacs I guess and the cider.nrepl middlewares were there for years. Yes but point is very much noted and we will plan on removing cider.nrepl from all our apps in prod

2020-06-30T21:17:34.316600Z

haha, I don't mean to be so judgmental, re-reading that

jacklombard 2020-06-30T21:18:09.317200Z

This probably also explains why when some of us tried to connect to a staging repl using cursive it didnt work, I know now that this because of cider middlewares

💯 1
2020-06-30T21:19:50.317900Z

can't ship the source, can connect via a remote repl, that's a fascinating combo of requirements

jacklombard 2020-06-30T21:19:53.318Z

Not at all, you are doing way beyond what is expected by helping so many 🙂

jacklombard 2020-06-30T21:23:34.318200Z

yup, we’ll be giving jars to a business partner whom we don’t want to share the source with, at the same time we want to be able to use the same new workflow of aot compilation but be able to remote repl

2020-06-30T21:24:03.318400Z

haha they must trust you a lot

jacklombard 2020-06-30T21:25:57.318600Z

Haha, not remote repl into theirs if that wasnt obvious