clojure-android / lein-droid

A Leiningen plugin for building Clojure/Android projects
Eclipse Public License 1.0
645 stars 56 forks source link

Completing in REPL in debug profile #23

Closed Profpatsch closed 10 years ago

Profpatsch commented 11 years ago

When you hit tab in the on-device REPL you get this:

VerifyError reply/exports$eval139  java.lang.Class.newInstanceImpl
(Class.java:-2) reply.eval-modes.nrepl=> CompilerException
java.lang.ClassNotFoundException: complete.core, compiling:
(NO_SOURCE_PATH:1) 

I assume it’s because of the stripped clojure and/or leiningen core on the device.

Could it be made possible to not strip this functionality when using the :dev profile?

alexander-yakushev commented 11 years ago

Well, there is nothing from Leiningen on the device. complete.core namespace looks new to me, if I'm able to put that on the device, auto-completion might work. I'll see what can be done on these weekends.

Mon-Ouie commented 11 years ago

Hey,

It seems to me all that needs to be done is to add clojure-complete as a dependency in the dev profile. It works on my device (it's rather slow though, but I guess there's no way to work around that).

alexander-yakushev commented 11 years ago

Hello Mon-Ouie,

Thank you for mentioning that! Have you tried it only from REPLy, or maybe you have it working with Emacs auto-complete as well?

Mon-Ouie commented 11 years ago

I tried it from lein droid repl and using ac-nrepl and both worked (but the latter was way too slow to be usable, it might work better if it fetched completions asynchronously).

EDIT: After retrying, I realize there's a bit more that needs to be done before it works. I had to explicitly (require '(complete.core)) for it to get loaded. I don't know what module is normally expected to load it.

alexander-yakushev commented 11 years ago

@Mon-Ouie In case you are still interested in Emacs auto-completion on Android, check out my report http://clojure-android.blogspot.com/2013/07/fragments-data-readers-verifyerrors-and.html . I've managed to bring completion latency to absolutely usable.

Profpatsch commented 11 years ago

Beautiful. Looks like you are making big progress.

alexander-yakushev commented 11 years ago

Thank you, @Profpatsch

Also as Mon-Ouie said, for completion in terminal REPL you can just install clojure-complete, it works decently.

I won't mark this issue as complete until I release proven and stable versions of clojure-complete and ac-nrepl.

alexander-yakushev commented 10 years ago

Now that Clojure on Android has an official completion engine, compliment, and a client for Emacs, ac-nrepl-compliment, I mark this issue as resolved. New issues regarding completion better be reported in those two repositories.

Thank you, Profpatsch and Mon-Ouie, for your involvement.