You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using boot together with cider and get the following error when
trying to serve a web page.
The problem here seems to be that the PrintWriter generated in
boot.util/auto-flush does not handle the .write call [1] with offset and
len as additional parameters.
cider-nrepl also creates a custom PrintWriter object. However, they
implement a Writer proxy and wrap that in a PrintWriter [2]. Maybe
boot should do the same.
clojure.lang.ArityException: Wrong number of args (4) passed to: util/auto-flush/fn--1148
at clojure.lang.AFn.throwArity(AFn.java:429)
at clojure.lang.AFn.invoke(AFn.java:44)
at boot.util.proxy$java.io.PrintWriter$ff19274a.write(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
at cider.nrepl.middleware.out$fork_out$fn__20871.invoke(out.clj:51)
at cider.nrepl.middleware.out.proxy$java.io.Writer$ff19274a.write(Unknown Source)
at java.io.PrintWriter.write(PrintWriter.java:456)
at java.io.PrintWriter.write(PrintWriter.java:473)
at clojure.core$fn__5853.invoke(core_print.clj:199)
at clojure.lang.MultiFn.invoke(MultiFn.java:233)
at clojure.core$pr_on.invoke(core.clj:3548)
at clojure.core$pr.invoke(core.clj:3560)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:630)
at clojure.core$prn.doInvoke(core.clj:3593)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:630)
at clojure.core$println.doInvoke(core.clj:3613)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at taoensso.timbre.appenders.core$println_appender$fn__13414.invoke(core.clj:101)
at taoensso.timbre$log1_fn$fn__13579.invoke(timbre.clj:407)
at clojure.lang.PersistentArrayMap.kvreduce(PersistentArrayMap.java:373)
at clojure.core$fn__6715.invoke(core.clj:6541)
at clojure.core.protocols$fn__6531$G__6526__6540.invoke(protocols.clj:174)
at clojure.core$reduce_kv.invoke(core.clj:6562)
at taoensso.timbre$log1_fn.invoke(timbre.clj:364)
at steinmetz.http.core$log_error$fn__41312.invoke(core.clj:755)
at cemerick.friend$handler_request.invoke(friend.clj:222)
at cemerick.friend$authenticate_STAR_.invoke(friend.clj:249)
at cemerick.friend$authenticate$fn__32448.invoke(friend.clj:260)
at user$fresh_app.invoke(user.clj:49)
at ring.middleware.reload$wrap_reload$fn__31513.invoke(reload.clj:22)
at org.httpkit.server.HttpHandler.run(RingHandler.java:91)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
And here's the patch I'm using currently, which fixes the issue. I'm
not sure though how to handle stripping of ansi escape characters when
len and offset are passed to write:
I'm using boot together with cider and get the following error when
trying to serve a web page.
The problem here seems to be that the PrintWriter generated in
boot.util/auto-flush does not handle the .write call [1] with offset and
len as additional parameters.
cider-nrepl also creates a custom PrintWriter object. However, they
implement a Writer proxy and wrap that in a PrintWriter [2]. Maybe
boot should do the same.
[1] http://docs.oracle.com/javase/7/docs/api/java/io/PrintWriter.html
[2] https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/out.clj#L43
Here's the stacktrace:
And here's the patch I'm using currently, which fixes the issue. I'm
not sure though how to handle stripping of ansi escape characters when
len and offset are passed to write:
The text was updated successfully, but these errors were encountered: