2011/3/18 Ken Wesson <kwess...@gmail.com> > On Fri, Mar 18, 2011 at 4:05 AM, Laurent PETIT <laurent.pe...@gmail.com> > wrote: > > Sure, this is the target solution. More complex than what I've done, > though. > > And the gathering of the metadata is not easy, also. > > Any Clojure IDE that can open a REPL should be able to get at the > metadata. Just eagerly spawn a runtime with the project classpaths and > everything, able to spawn REPL servers on command via a kind of > meta-REPL-server. Use a hidden one to send metadata requests and for > other purposes, and if the user opens a REPL, spawn another. The only > real issue then arises if the user causes a System/exit (or a VM > crash) or monkeys with threads in a manner that kills stuff. If the > indent (and anything else that queries the hidden REPL under the hood) > loses the connection just generate a tray alert and respawn the entire > subordinate JVM. The user will find that doing those things reboots > their REPL. (You may want to detect the case of deliberate System/exit > and not automatically restart the user REPL in that case, only the > under-the-hood one. That should be easy, as the child process will > have actually exited and probably with errorlevel 0 in that case.) >
All you describe is good, and is options already envisioned. Nothing new under the sun, but nicely summarized. Tho sharing the same JVM between the user and ccw might not be really interesting in case of remote connections, specific ways of starting it, etc. > > If we go the static analysis road, then some deps may not be distributed > as > > source code and we may not be able to get the info. > > True. > > > If we go the dynamic road, then the smart identation may behave > differently > > depending on whether a REPL for the project is loaded or not, and if it > is > > loaded, which parts of the application are in memory. > > Ah, you're worried about resolve? Not at all. ns-resolve will not discover vars if the namespace hasn't been required, used or loaded first. > Just use (ns-resolve the-namespace > symbol), then, with the-namespace derived from the file's path and > name, e.g. if it's com/my_domain/my_project/core.clj the namespace is > com.my-domain.my-project.core. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en