ring

2017-12-11T17:33:15.000250Z

Doing something like lein ring uberwar keeps failing in my project with an exception of the form:

java.lang.AssertionError: Assert failed: (dep-spec? dep-spec)
	at leinjacker.deps$dep_name.invokeStatic(deps.clj:23)
	at leinjacker.deps$dep_name.invoke(deps.clj:23)
	at leinjacker.deps$has_dep_QMARK_$fn__9834.invoke(deps.clj:41)
	at clojure.core$some.invokeStatic(core.clj:2592)
	at clojure.core$some.invoke(core.clj:2583)
	at leinjacker.deps$has_dep_QMARK_.invokeStatic(deps.clj:41)
	at leinjacker.deps$has_dep_QMARK_.invoke(deps.clj:30)
	at leinjacker.deps$add_if_missing.invokeStatic(deps.clj:50)
	at leinjacker.deps$add_if_missing.invoke(deps.clj:43)
	at leiningen.ring.war$add_servlet_dep.invokeStatic(war.clj:223)
	at leiningen.ring.war$add_servlet_dep.invoke(war.clj:221)
	at leiningen.ring.war$war.invokeStatic(war.clj:232)
	at leiningen.ring.war$war.doInvoke(war.clj:226)
	at clojure.lang.RestFn.invoke(RestFn.java:521)
	at leiningen.ring.uberwar$uberwar.invokeStatic(uberwar.clj:42)
	at leiningen.ring.uberwar$uberwar.invoke(uberwar.clj:37)
	at leiningen.ring.uberwar$uberwar.invokeStatic(uberwar.clj:40)
	at leiningen.ring.uberwar$uberwar.invoke(uberwar.clj:37)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:648)
	at clojure.core$apply.invoke(core.clj:641)
	at leiningen.ring$ring.invokeStatic(ring.clj:28)

2017-12-11T17:33:33.000125Z

I see that lein.ring.war/war attempts to automatically add more deps to project when needed

2017-12-11T17:33:47.000085Z

I leave those dependencies out and get this error, I try to explicitly include them to skip the problem and I still get the error

2017-12-11T17:34:03.000811Z

I tried this with both [lein-ring "0.12.1"] and [lein-ring "0.12.2"]

2017-12-11T17:34:22.000393Z

I don’t get why it’d be failing. I can’t see anything I can control in my project.clj to make this not happen

2017-12-11T17:35:35.000256Z

the assert failure also isn’t super informative. I wish it printed out the actual value

2017-12-11T18:16:08.000100Z

Figured it out. lein-ring uses leinjacker which didn’t add support to :managed-dependencies in any released version.

2017-12-11T18:16:15.000251Z

My project is using managed deps

2017-12-11T18:16:34.000355Z

So, looks like there isn’t a super graceful way to handle this other than to just not used managed deps yet.

2017-12-11T18:18:12.000526Z

I guess it does look like a fork may have it covered. Will try that for now.