[NREPL-38] Certain Calendar values don't seem to be able to print Created: 12/Jan/13 Updated: 13/Jan/13 Resolved: 13/Jan/13 |
|
| Status: | Closed |
| Project: | tools.nrepl |
| Component/s: | None |
| Affects Version/s: | 0.2.0 |
| Fix Version/s: | 0.2.1 |
| Type: | Defect | Priority: | Major |
| Reporter: | Julian Birch | Assignee: | Unassigned |
| Resolution: | Completed | Votes: | 0 |
| Labels: | bug | ||
| Environment: |
Ubuntu 12.10, running through Leiningen 2 |
||
| Description |
|
If I try to run lein repl outside of a project folder, I get Clojure 1.4.0. (println (javax.xml.bind.DatatypeConverter/parseDateTime "2008-07-21T19:17:29")) which produces IndexOutOfBoundsException start 26, end 2, s.length() 28 java.lang.AbstractStringBuilder.append (AbstractStringBuilder.java:476) Note the absence of a closing '"'. My apologies in advance if this is impossible to reproduce. |
| Comments |
| Comment by Andy Fingerhut [ 13/Jan/13 9:55 AM ] |
|
I can reproduce this with Clojure 1.4.0 and 1.5.0-RC2 if I do it within "lein2 repl" (I was using Leiningen version 2.0.0-preview10 to reproduce the problem). If I use "java -cp clojure.jar clojure.main" to start a REPL session, with either Clojure 1.4.0 or 1.5.0-RC2 for clojure.jar, I don't see any problem. I was testing on Mac OS X 10.6.8 with Oracle/Apple JDK 1.6.0_37. I also don't see this problem if I use Leiningen version 1.7.1, tested with both Clojure 1.4.0 and 1.5.0-RC2. This appears to be some kind of bad interaction between Leiningen 2.0.0-preview10 and Clojure. |
| Comment by Andy Fingerhut [ 13/Jan/13 10:05 AM ] |
|
I also reproduced this issue with the latest version of Leiningen, which is 2.0.0-RC2. Email sent to the Leiningen developer email list so they know about it. |
| Comment by Chas Emerick [ 13/Jan/13 10:52 AM ] |
|
This is an nREPL bug involving an API mismatch between java.io.Writer.write() and java.lang.AbstractStringBuilder.append(). The fix is simple; patch release coming later today. |
| Comment by Chas Emerick [ 13/Jan/13 12:29 PM ] |
|
Fixed with b9e930a1. Will be a part of [org.clojure/tools.nrepl "0.2.1"], to be released later today. |
[NREPL-37] Printing reference returned by clojure.tools.nrepl.server/start-server causes multimethod exception Created: 20/Dec/12 Updated: 26/Feb/13 Resolved: 26/Feb/13 |
|
| Status: | Closed |
| Project: | tools.nrepl |
| Component/s: | None |
| Affects Version/s: | 0.2.0-RC1 |
| Fix Version/s: | 0.2.2 |
| Type: | Defect | Priority: | Minor |
| Reporter: | Vaughn Dickson | Assignee: | Chas Emerick |
| Resolution: | Completed | Votes: | 0 |
| Labels: | bug | ||
| Description |
|
I was accidentally printing the reference returned by start-server by calling it as the final function in my main method, which causes this error: java.lang.IllegalArgumentException: Multiple methods in multimethod 'print-method' match dispatch value: class clojure.tools.nrepl.server.Server -> interface clojure.lang.IDeref and interface clojure.lang.IRecord, and neither is preferred |
| Comments |
| Comment by Chas Emerick [ 02/Feb/13 7:35 AM ] |
|
The fact that the returned record is also a clojure.lang.IDeref is a temporary compatibility measure, a result of changing to returning a record. Adding a print-method implementation for the Server type that explicitly delegates to the IRecord implementation would resolve the problem. |
| Comment by Chas Emerick [ 26/Feb/13 4:42 AM ] |
|
Fixed @ http://github.com/clojure/tools.nrepl/commit/0f016eb |
[NREPL-19] Android: nREPL starts with no namespace Created: 11/May/12 Updated: 20/Jun/12 Resolved: 20/Jun/12 |
|
| Status: | Closed |
| Project: | tools.nrepl |
| Component/s: | None |
| Affects Version/s: | 0.2.0 |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Alexander Yakushev | Assignee: | Chas Emerick |
| Resolution: | Completed | Votes: | 0 |
| Labels: | android,, bug | ||
| Environment: |
Android w/ Clojure 1.4.0, REPLy client / Eclipse CCW client |
||
| Description |
|
When I start the nREPL on the Android device (by calling `(clojure.tools.nrepl.server/start-server :port 9999)`) it all goes well. But when I try to connect to this REPL using any of the clients I find myself in an empty namespace (or something like that). The var ns is unbound, no functions from the clojure.core are available. At the beginning REPLy tries to perform some actions but they fail (says that it cannot find symbol `defn` - because nothing from clojure.core is being mapped). However I can do (in-ns 'anywhere) it works. Everything else in the REPL works correctly (as far as I see). The issue itself is minor but I'm afraid that it is caused by some crash during nREPL initialization that might lead to other problems in future. |
| Comments |
| Comment by Alexander Yakushev [ 11/May/12 11:06 AM ] |
|
Can't edit, I meant the *ns* var, of course. |
| Comment by Alexander Yakushev [ 19/May/12 4:32 PM ] |
|
With the help of Daniel Solano Gómez I managed to fix this bug. The problem was caused by the lack of user namespace in the Android-patched Clojure. nREPL assumes that the user namespace is present and uses it by default. Here's the so called fix I ended up with: ...
(let [user-ns (create-ns 'user)]
(binding [*ns* user-ns]
(clojure.tools.nrepl.server/start-server :port 9999)))
...
The issue can be closed now. |
| Comment by Chas Emerick [ 27/May/12 4:04 PM ] |
|
A follow up Q: user is created by clojure.lang.RT's static initialization. Is the lack of that in "Android-patched Clojure" an optimization of some sort? |
| Comment by Alexander Yakushev [ 27/May/12 4:49 PM ] |
|
Exactly, Daniel Solano Gómez removed it because it's initialization took additional time, it seems. |
[NREPL-16] nrepl.middleware.interruptible_eval/interruptible_eval raises a stack inconsistence Exception if the call to clojure.main/repl fails Created: 12/Apr/12 Updated: 20/Apr/12 Resolved: 16/Apr/12 |
|
| Status: | Closed |
| Project: | tools.nrepl |
| Component/s: | None |
| Affects Version/s: | 0.2.0 |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Alexander Yakushev | Assignee: | Chas Emerick |
| Resolution: | Completed | Votes: | 0 |
| Labels: | bug | ||
| Environment: |
clojure 1.4.0-beta5, Android |
||
| Description |
|
If the call to clojure.main/repl in `evaluate' raises an exception before the :init part gets evaluated (so the expression `(push-thread-bindings @bindings)' is executed) then nREPL crashes with the following exception: java.lang.IllegalStateException: Pop without matching push It happens because after the underlining exception in clojure.main/repl is caught by the try block in `evaluate', the `finally' black calls (pop-thread-bindings) which were not actually "pushed". |
| Comments |
| Comment by Chas Emerick [ 16/Apr/12 5:34 PM ] |
|
Fixed in 0.2.0-beta6. Please give it a try and see how it works on Android. |
| Comment by Alexander Yakushev [ 20/Apr/12 1:40 PM ] |
|
It is OK now. OK in a sense that if something wrong happens inside the clojure.main/repl function then the stacktrace points there after the application dies. |