Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmatched bracket or quote #587

Closed
kostafey opened this issue May 28, 2014 · 14 comments
Closed

Unmatched bracket or quote #587

kostafey opened this issue May 28, 2014 · 14 comments
Milestone

Comments

@kostafey
Copy link
Member

CIDER 20140528.14

eval:
(.split "1,2,3" ",")

result (in messages buffer):
Error: (error "Unmatched bracket or quote")

@bbatsov
Copy link
Member

bbatsov commented May 29, 2014

I can't reproduce this.

@kostafey
Copy link
Member Author

CIDER 20140528.928

lein new test-prj
M-x cider-jack-in in core.clj

File core.clj contents:

(ns test-prj.core)
(.split "1,2,3" ",")

Eval (.split "1,2,3" ",") in *cider-repl test-prj* is ok
Eval (.split "1,2,3" ",") via C-c C-p (cider-pprint-eval-last-sexp) is ok
Eval (.split "1,2,3" ",") via C-x C-e (cider-eval-last-sexp) leads to ``Error: (error "Unmatched bracket or quote")`

@turbopape
Copy link
Contributor

I actually noted that it depends on when the point is when you do your C-x C-e
I noted that it evaluates the strings from your point back to first separator it encounters (last sexp ?)
If you put the point somewhere between split and the first double-quote, it shows (alongside the java exception that he can't resolve .split) (error: (scan-error "unbalanced parenthesis")). But isn't this the normal behaiour for eval last sexp ? the symbol .split has unbalanced parens after all ?

@bbatsov
Copy link
Member

bbatsov commented May 29, 2014

@turbopape Yeah, you're right. The problem is that the sexp preceding the point is the symbol .split, but it cannot be evaluated by itself. If it were a var, there would be no error:

(+ |1 2 3)

(| is the cursor position)

I guess we need a check if the last sexp is Java(Script) method name.

@bbatsov
Copy link
Member

bbatsov commented May 29, 2014

We have a different problem. Seems that the exception info is not properly encoded and cannot be decoded.

Error: (error "Cannot decode message: d5:class39:clojure.lang.Compiler$CompilerException2:id3:1997:message151:java.lang.RuntimeException: Unable to resolve symbol: splite in this context, compiling:(/Users/bozhidar/projects/cider-nrepl/src/cider/nrepl.clj:12:1)7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd483ed5:class26:java.lang.RuntimeException2:id3:1997:message48:Unable to resolve symbol: splite in this context7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd483ed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6380e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl3:dup4:javae2:id3:1994:linei6322e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class32:clojure.lang.Compiler$InvokeExpr4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei3573e6:method5:parse4:name38:clojure.lang.Compiler$InvokeExpr/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6562e6:method10:analyzeSeq4:name32:clojure.lang.Compiler/analyzeSeq7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6361e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl3:dup4:javae2:id3:1994:linei6322e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class37:clojure.lang.Compiler$BodyExpr$Parser4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei5708e6:method5:parse4:name43:clojure.lang.Compiler$BodyExpr$Parser/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class30:clojure.lang.Compiler$FnMethod4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei5139e6:method5:parse4:name36:clojure.lang.Compiler$FnMethod/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class28:clojure.lang.Compiler$FnExpr4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei3751e6:method5:parse4:name34:clojure.lang.Compiler$FnExpr/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6558e6:method10:analyzeSeq4:name32:clojure.lang.Compiler/analyzeSeq7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6361e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6616e6:method4:eval4:name26:clojure.lang.Compiler/eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei7064e6:method4:load4:name26:clojure.lang.Compiler/load7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class20:cider.nrepl$eval30454:file32:form-init2312093533720390255.clj5:flagsl4:repl3:clje2:fn8:eval30452:id3:1994:linei1e6:method6:invoke4:name27:cider.nrepl$eval3045/invoke2:ns11:cider.nrepl7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var20:cider.nrepl/eval3045ed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl7:tooling4:javae2:id3:1994:linei6619e6:method4:eval4:name26:clojure.lang.Compiler/eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl3:dup7:tooling4:javae2:id3:1994:linei6582e6:method4:eval4:name26:clojure.lang.Compiler/eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class17:clojure.core$eval4:file8:core.clj5:flagsl3:clj7:toolinge2:fn4:eval2:id3:1994:linei2852e6:method6:invoke4:name24:clojure.core$eval/invoke2:ns12:clojure.core7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.core/evaled5:class48:clojure.main$repl$read_eval_print__6588$fn__65914:file8:main.clj5:flagsl3:clj7:toolinge2:fn23:repl/read-eval-print/fn2:id3:1994:linei259e6:method6:invoke4:name55:clojure.main$repl$read_eval_print__6588$fn__6591/invoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class39:clojure.main$repl$read_eval_print__65884:file8:main.clj5:flagsl3:dup3:clj7:toolinge2:fn20:repl/read-eval-print2:id3:1994:linei259e6:method6:invoke4:name46:clojure.main$repl$read_eval_print__6588/invoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class26:clojure.main$repl$fn__65974:file8:main.clj5:flagsl3:clj7:toolinge2:fn7:repl/fn2:id3:1994:linei277e6:method6:invoke4:name33:clojure.main$repl$fn__6597/invoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class17:clojure.main$repl4:file8:main.clj5:flagsl3:dup3:clj7:toolinge2:fn4:repl2:id3:1994:linei277e6:method8:doInvoke4:name26:clojure.main$repl/doInvoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class19:clojure.lang.RestFn4:file11:RestFn.java5:flagsl7:tooling4:javae2:id3:1994:linei1096e6:method6:invoke4:name26:clojure.lang.RestFn/invoke7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class66:clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__5914:file22:interruptible_eval.clj5:flagsl3:clj7:toolinge2:fn16:evaluate/fn--5912:id3:1994:linei56e6:method6:invoke4:name73:clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__591/invoke2:ns49:clojure.tools.nrepl.middleware.interruptible-eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var58:clojure.tools.nrepl.middleware.interruptible-eval/evaluateed5:class16:clojure.lang.AFn4:file8:AFn.java5:flagsl7:tooling4:javae2:id3:1994:linei159e6:method13:applyToHelper4:name30:clojure.lang.AFn/applyToHelper7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class16:clojure.lang.AFn4:file8:AFn.java5:flagsl7:tooling4:javae2:id3:1994:linei151e6:method7:applyTo4:name24:clojure.lang.AFn/applyTo7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class18:clojure.core$apply4:file8:core.clj5:flagsl3:clj7:toolinge2:fn5:apply2:id3:1994:linei617e6:method6:invoke4:name25:clojure.core$apply/invoke2:ns12:clojure.core7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var18:clojure.core/applyed5:class32:clojure.core$with_bindings_STAR_4:file8:core.clj5:flagsl3:clj7:toolinge2:fn14:with-bindings*2:id3:1994:linei1788e6:method8:doInvoke4:name41:clojure.core$with_bindings_STAR_/doInvoke2:ns12:clojure.core7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var27:clojure.core/with-bindings*ed5:class19:clojure.lang.RestFn4:file11:RestFn.java5:flagsl7:tooling4:javae2:id3:1994:linei425e6:method6:invoke4:name26:clojure.lang.RestFn/invoke7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class58:clojure.tools.nrepl.middleware.interruptible_eval$evaluate4:file22:interruptible_eval.clj5:flagsl3:clj7:toolinge2:fn8:evaluate2:id3:1994:linei41e6:method6:invoke4:name65:clojure.tools.nrepl.middleware.interruptible_eval$evaluate/invoke2:ns49:clojure.tools.nrepl.middleware.interruptible-eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var58:clojure.tools.nrepl.middleware.interruptible-eval/evaluateed5:class84:clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__632$fn__6354:file22:interruptible_eval.clj5:flagsl3:clj7:toolinge2:fn34:interruptible-eval/fn--632/fn--6352:id3:1994:linei171e6:method6:invoke4:name91:clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__632$fn__635/invoke2:ns49:clojure.tools.nrepl.middleware.interruptible-eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var68:clojure.tools.nrepl.middleware.interruptible-eval/interruptible-evaled5:class26:clojure.core$comp$fn__41544:file8:core.clj5:flagsl3:clj7:toolinge2:fn7:comp/fn2")

This is unlikely to be a big problem in practice, but is pretty annoying never-the-less. //cc @gtrak @jeffvalk

@gtrak
Copy link
Contributor

gtrak commented May 29, 2014

Yeesh.

Is there a general solution to the arbitrary clojure data structures
problem?

On Thu, May 29, 2014 at 12:03 PM, Bozhidar Batsov
[email protected]:

We have a different problem. Seems that the exception info is not properly
encoded and cannot be decoded.

Error: (error "Cannot decode message: d5:class39:clojure.lang.Compiler$CompilerException2:id3:1997:message151:java.lang.RuntimeException: Unable to resolve symbol: splite in this context, compiling:(/Users/bozhidar/projects/cider-nrepl/src/cider/nrepl.clj:12:1)7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd483ed5:class26:java.lang.RuntimeException2:id3:1997:message48:Unable to resolve symbol: splite in this context7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd483ed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6380e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl3:dup4:javae2:id3:1994:linei6322e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class32:clojure.lang.Compiler$InvokeExpr4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei3573e6:me
thod5:parse4:name38:clojure.lang.Compiler$InvokeExpr/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6562e6:method10:analyzeSeq4:name32:clojure.lang.Compiler/analyzeSeq7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6361e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl3:dup4:javae2:id3:1994:linei6322e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class37:clojure.lang.Compiler$BodyExpr$Parser4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei5708e6:method5:parse4:name43:clojure.lang.Compiler$BodyExpr$Parser/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class30:clo
jure.lang.Compiler$FnMethod4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei5139e6:method5:parse4:name36:clojure.lang.Compiler$FnMethod/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class28:clojure.lang.Compiler$FnExpr4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei3751e6:method5:parse4:name34:clojure.lang.Compiler$FnExpr/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6558e6:method10:analyzeSeq4:name32:clojure.lang.Compiler/analyzeSeq7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6361e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6616e6:method4:eval4:name26:clojure.lang.Compiler/eval7:session36:72e41
f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei7064e6:method4:load4:name26:clojure.lang.Compiler/load7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class20:cider.nrepl$eval30454:file32:form-init2312093533720390255.clj5:flagsl4:repl3:clje2:fn8:eval30452:id3:1994:linei1e6:method6:invoke4:name27:cider.nrepl$eval3045/invoke2:ns11:cider.nrepl7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var20:cider.nrepl/eval3045ed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl7:tooling4:javae2:id3:1994:linei6619e6:method4:eval4:name26:clojure.lang.Compiler/eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl3:dup7:tooling4:javae2:id3:1994:linei6582e6:method4:eval4:name26:clojure.lang.Compiler/eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class17:clojure.core$eval4:file8:core.clj5:fl
agsl3:clj7:toolinge2:fn4:eval2:id3:1994:linei2852e6:method6:invoke4:name24:clojure.core$eval/invoke2:ns12:clojure.core7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.core/evaled5:class48:clojure.main$repl$read_eval_print__6588$fn__65914:file8:main.clj5:flagsl3:clj7:toolinge2:fn23:repl/read-eval-print/fn2:id3:1994:linei259e6:method6:invoke4:name55:clojure.main$repl$read_eval_print__6588$fn__6591/invoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class39:clojure.main$repl$read_eval_print__65884:file8:main.clj5:flagsl3:dup3:clj7:toolinge2:fn20:repl/read-eval-print2:id3:1994:linei259e6:method6:invoke4:name46:clojure.main$repl$read_eval_print__6588/invoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class26:clojure.main$repl$fn__65974:file8:main.clj5:flagsl3:clj7:toolinge2:fn7:repl/fn2:id3:1994:linei277e6:method6:invoke4:name33:clojure.main
$repl$fn__6597/invoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class17:clojure.main$repl4:file8:main.clj5:flagsl3:dup3:clj7:toolinge2:fn4:repl2:id3:1994:linei277e6:method8:doInvoke4:name26:clojure.main$repl/doInvoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class19:clojure.lang.RestFn4:file11:RestFn.java5:flagsl7:tooling4:javae2:id3:1994:linei1096e6:method6:invoke4:name26:clojure.lang.RestFn/invoke7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class66:clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__5914:file22:interruptible_eval.clj5:flagsl3:clj7:toolinge2:fn16:evaluate/fn--5912:id3:1994:linei56e6:method6:invoke4:name73:clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__591/invoke2:ns49:clojure.tools.nrepl.middleware.interruptible-eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var58:clojure.tool
s.nrepl.middleware.interruptible-eval/evaluateed5:class16:clojure.lang.AFn4:file8:AFn.java5:flagsl7:tooling4:javae2:id3:1994:linei159e6:method13:applyToHelper4:name30:clojure.lang.AFn/applyToHelper7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class16:clojure.lang.AFn4:file8:AFn.java5:flagsl7:tooling4:javae2:id3:1994:linei151e6:method7:applyTo4:name24:clojure.lang.AFn/applyTo7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class18:clojure.core$apply4:file8:core.clj5:flagsl3:clj7:toolinge2:fn5:apply2:id3:1994:linei617e6:method6:invoke4:name25:clojure.core$apply/invoke2:ns12:clojure.core7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var18:clojure.core/applyed5:class32:clojure.core$with_bindings_STAR_4:file8:core.clj5:flagsl3:clj7:toolinge2:fn14:with-bindings_2:id3:1994:linei1788e6:method8:doInvoke4:name41:clojure.core$with_bindings_STAR_/doInvoke2:ns12:clojure.core7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var27:clojure.c
ore/with-bindings_ed5:class19:clojure.lang.RestFn4:file11:RestFn.java5:flagsl7:tooling4:javae2:id3:1994:linei425e6:method6:invoke4:name26:clojure.lang.RestFn/invoke7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class58:clojure.tools.nrepl.middleware.interruptible_eval$evaluate4:file22:interruptible_eval.clj5:flagsl3:clj7:toolinge2:fn8:evaluate2:id3:1994:linei41e6:method6:invoke4:name65:clojure.tools.nrepl.middleware.interruptible_eval$evaluate/invoke2:ns49:clojure.tools.nrepl.middleware.interruptible-eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var58:clojure.tools.nrepl.middleware.interruptible-eval/evaluateed5:class84:clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__632$fn__6354:file22:interruptible_eval.clj5:flagsl3:clj7:toolinge2:fn34:interruptible-eval/fn--632/fn--6352:id3:1994:linei171e6:method6:invoke4:name91:clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__632$fn__635/invoke2:ns49:clojure.too
ls.nrepl.middleware.interruptible-eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var68:clojure.tools.nrepl.middleware.interruptible-eval/interruptible-evaled5:class26:clojure.core$comp$fn__41544:file8:core.clj5:flagsl3:clj7:toolinge2:fn7:comp/fn2")

This is unlikely to be a big problem in practice, but is pretty annoying
never-the-less. //cc @gtrak https://github.com/gtrak @jeffvalkhttps://github.com/jeffvalk


Reply to this email directly or view it on GitHubhttps://github.com//issues/587#issuecomment-44549095
.

@gtrak
Copy link
Contributor

gtrak commented May 29, 2014

Though, this looks like it might just be hitting an edge-case in the elisp
bencode impl instead of something inherently wrong with the message.

On Thu, May 29, 2014 at 12:22 PM, Gary Trakhman [email protected]:

Yeesh.

Is there a general solution to the arbitrary clojure data structures
problem?

On Thu, May 29, 2014 at 12:03 PM, Bozhidar Batsov <
[email protected]> wrote:

We have a different problem. Seems that the exception info is not
properly encoded and cannot be decoded.

Error: (error "Cannot decode message: d5:class39:clojure.lang.Compiler$CompilerException2:id3:1997:message151:java.lang.RuntimeException: Unable to resolve symbol: splite in this context, compiling:(/Users/bozhidar/projects/cider-nrepl/src/cider/nrepl.clj:12:1)7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd483ed5:class26:java.lang.RuntimeException2:id3:1997:message48:Unable to resolve symbol: splite in this context7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd483ed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6380e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl3:dup4:javae2:id3:1994:linei6322e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class32:clojure.lang.Compiler$InvokeExpr4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei3573e6:me
thod5:parse4:name38:clojure.lang.Compiler$InvokeExpr/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6562e6:method10:analyzeSeq4:name32:clojure.lang.Compiler/analyzeSeq7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6361e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl3:dup4:javae2:id3:1994:linei6322e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class37:clojure.lang.Compiler$BodyExpr$Parser4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei5708e6:method5:parse4:name43:clojure.lang.Compiler$BodyExpr$Parser/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class30:clo
jure.lang.Compiler$FnMethod4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei5139e6:method5:parse4:name36:clojure.lang.Compiler$FnMethod/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class28:clojure.lang.Compiler$FnExpr4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei3751e6:method5:parse4:name34:clojure.lang.Compiler$FnExpr/parse7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6558e6:method10:analyzeSeq4:name32:clojure.lang.Compiler/analyzeSeq7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6361e6:method7:analyze4:name29:clojure.lang.Compiler/analyze7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei6616e6:method4:eval4:name26:clojure.lang.Compiler/eval7:session36:72e41
f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl4:javae2:id3:1994:linei7064e6:method4:load4:name26:clojure.lang.Compiler/load7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class20:cider.nrepl$eval30454:file32:form-init2312093533720390255.clj5:flagsl4:repl3:clje2:fn8:eval30452:id3:1994:linei1e6:method6:invoke4:name27:cider.nrepl$eval3045/invoke2:ns11:cider.nrepl7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var20:cider.nrepl/eval3045ed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl7:tooling4:javae2:id3:1994:linei6619e6:method4:eval4:name26:clojure.lang.Compiler/eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class21:clojure.lang.Compiler4:file13:Compiler.java5:flagsl3:dup7:tooling4:javae2:id3:1994:linei6582e6:method4:eval4:name26:clojure.lang.Compiler/eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class17:clojure.core$eval4:file8:core.clj5:fl
agsl3:clj7:toolinge2:fn4:eval2:id3:1994:linei2852e6:method6:invoke4:name24:clojure.core$eval/invoke2:ns12:clojure.core7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.core/evaled5:class48:clojure.main$repl$read_eval_print__6588$fn__65914:file8:main.clj5:flagsl3:clj7:toolinge2:fn23:repl/read-eval-print/fn2:id3:1994:linei259e6:method6:invoke4:name55:clojure.main$repl$read_eval_print__6588$fn__6591/invoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class39:clojure.main$repl$read_eval_print__65884:file8:main.clj5:flagsl3:dup3:clj7:toolinge2:fn20:repl/read-eval-print2:id3:1994:linei259e6:method6:invoke4:name46:clojure.main$repl$read_eval_print__6588/invoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class26:clojure.main$repl$fn__65974:file8:main.clj5:flagsl3:clj7:toolinge2:fn7:repl/fn2:id3:1994:linei277e6:method6:invoke4:name33:clojure.main
$repl$fn__6597/invoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class17:clojure.main$repl4:file8:main.clj5:flagsl3:dup3:clj7:toolinge2:fn4:repl2:id3:1994:linei277e6:method8:doInvoke4:name26:clojure.main$repl/doInvoke2:ns12:clojure.main7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var17:clojure.main/repled5:class19:clojure.lang.RestFn4:file11:RestFn.java5:flagsl7:tooling4:javae2:id3:1994:linei1096e6:method6:invoke4:name26:clojure.lang.RestFn/invoke7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class66:clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__5914:file22:interruptible_eval.clj5:flagsl3:clj7:toolinge2:fn16:evaluate/fn--5912:id3:1994:linei56e6:method6:invoke4:name73:clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__591/invoke2:ns49:clojure.tools.nrepl.middleware.interruptible-eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var58:clojure.tool
s.nrepl.middleware.interruptible-eval/evaluateed5:class16:clojure.lang.AFn4:file8:AFn.java5:flagsl7:tooling4:javae2:id3:1994:linei159e6:method13:applyToHelper4:name30:clojure.lang.AFn/applyToHelper7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class16:clojure.lang.AFn4:file8:AFn.java5:flagsl7:tooling4:javae2:id3:1994:linei151e6:method7:applyTo4:name24:clojure.lang.AFn/applyTo7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class18:clojure.core$apply4:file8:core.clj5:flagsl3:clj7:toolinge2:fn5:apply2:id3:1994:linei617e6:method6:invoke4:name25:clojure.core$apply/invoke2:ns12:clojure.core7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var18:clojure.core/applyed5:class32:clojure.core$with_bindings_STAR_4:file8:core.clj5:flagsl3:clj7:toolinge2:fn14:with-bindings_2:id3:1994:linei1788e6:method8:doInvoke4:name41:clojure.core$with_bindings_STAR_/doInvoke2:ns12:clojure.core7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var27:clojure.c
ore/with-bindings_ed5:class19:clojure.lang.RestFn4:file11:RestFn.java5:flagsl7:tooling4:javae2:id3:1994:linei425e6:method6:invoke4:name26:clojure.lang.RestFn/invoke7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type4:javaed5:class58:clojure.tools.nrepl.middleware.interruptible_eval$evaluate4:file22:interruptible_eval.clj5:flagsl3:clj7:toolinge2:fn8:evaluate2:id3:1994:linei41e6:method6:invoke4:name65:clojure.tools.nrepl.middleware.interruptible_eval$evaluate/invoke2:ns49:clojure.tools.nrepl.middleware.interruptible-eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var58:clojure.tools.nrepl.middleware.interruptible-eval/evaluateed5:class84:clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__632$fn__6354:file22:interruptible_eval.clj5:flagsl3:clj7:toolinge2:fn34:interruptible-eval/fn--632/fn--6352:id3:1994:linei171e6:method6:invoke4:name91:clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__632$fn__635/invoke2:ns49:clojure.too
ls.nrepl.middleware.interruptible-eval7:session36:72e41f0d-fb11-44b2-ad25-79d8b4abd4834:type3:clj3:var68:clojure.tools.nrepl.middleware.interruptible-eval/interruptible-evaled5:class26:clojure.core$comp$fn__41544:file8:core.clj5:flagsl3:clj7:toolinge2:fn7:comp/fn2")

This is unlikely to be a big problem in practice, but is pretty annoying
never-the-less. //cc @gtrak https://github.com/gtrak @jeffvalkhttps://github.com/jeffvalk


Reply to this email directly or view it on GitHubhttps://github.com//issues/587#issuecomment-44549095
.

@bbatsov
Copy link
Member

bbatsov commented May 29, 2014

I'm pretty sure something's wrong with the elisp implementation as @cemerick wouldn't have chosen bencode otherwise. :-)

Anyways, I'm not particularly thrilled to debug it...

@gtrak
Copy link
Contributor

gtrak commented May 29, 2014

It might be a week or so before I get a chunk of time sufficient for this
(and I'd really like to tackle the exceptions middleware as well).

On Thu, May 29, 2014 at 12:30 PM, Bozhidar Batsov
[email protected]:

I'm pretty sure something's wrong with the elisp implementation as
@cemerick https://github.com/cemerick wouldn't have chosen bencode
otherwise. :-)

Anyways, I'm not particularly thrilled to debug it...


Reply to this email directly or view it on GitHubhttps://github.com//issues/587#issuecomment-44552450
.

@cemerick
Copy link
Contributor

Not sure what I can add here, but I was mentioned, so: keep in mind that bencode cannot represent everything that e.g. EDN can (nREPL's design predated EDN by some time, so it wasn't considered). That said, IIRC, nREPL's bencode encoder will "downcast" various sorts of Clojure structures to the closest bencode equivalents (e.g. sets -> lists). Beyond this detail, I'd presume that any issues are implementation-dependent.

@jeffvalk
Copy link
Contributor

Is there bencode reference implementation that we might test both the client and server against? It would beat the guesswork.

@bbatsov
Copy link
Member

bbatsov commented May 29, 2014

@jeffvalk I guess we can consider whatever nREPL is using as the reference implementation.

@gtrak
Copy link
Contributor

gtrak commented May 29, 2014

That's what I've been doing up to this point, I haven't found anything
surprising in the clojure impl yet.

On Thu, May 29, 2014 at 1:41 PM, Bozhidar Batsov
[email protected]:

@jeffvalk https://github.com/jeffvalk I guess we can consider whatever
nREPL is using as the reference implementation.


Reply to this email directly or view it on GitHubhttps://github.com//issues/587#issuecomment-44560947
.

@bbatsov bbatsov added this to the v0.7 milestone Jun 6, 2014
@bbatsov
Copy link
Member

bbatsov commented Jun 11, 2014

I'm an idiot. This has nothing to do with the Emacs Lisp encoding implementation - after all this is the response we were receiving for decoding from nREPL server. :-) The message was incomplete, causing the decode error. This was fixed in #616.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants