Hi, On 23 jan, 01:43, Peter Wolf <opus...@gmail.com> wrote: > Hi Laurent, > 1) Does Eclipse use the server for resolving references?
Currently, the only resolved references are those that come from a clojure environment launched by the user. So yes. When time comes to resolve references for the needs of the editor, then, indeed, we will have to make a choice : a) rely on the fact that the user has launched an environment, and on the fact that this environment and the editor are sufficiently in sync with each other (that's what slime does, AFAIK, and that's probably what clojuredev will do first). b) or have the clojuredev plugin launch, behind the scene, a environment just for its own needs. > 2) Is the server visible to the user, or hidden inside Eclipse? I think 1) answered to that. > 3) Does the server call load-file? Not yet. It calls 'load-string for the correct execution, in the environment launched by the user (if any, 'cause if none, nothing happens, or maybe a warning popup, I don't remember), of the command string. The next step for clojuredev will be to leverage auto-build, but it's not been done yet. > 4) Can the user break the server with bogus code in a file? Not the server in the sense "the clojuredev environment, and so the running eclipse". But the server that every launch made by the user triggers automatically. > 5) What happens if a file has top level code that pops up a > window/starts a process? This is exactly the same question that makes me think twice about how to do auto-build. At first, I thought I had found the solution by restricting the problem to only do auto-build by compiling files that represent libs. But this too won't work as expected, because 'compile will also load the code in the environment that does the compilation (was the subject of another e-mail). > 6) How does the user know when the server is broken? For the moment, he knows immediately, because the only server clojudev talks to is the one embedded in a configuration launched by him => his REPL ... will be broken also. When time comes to have an "under the hoods" server just for clojuredev's purpose, then I think I'll implement some 'ping remote function that would return true or false or ... nothing at all if it's dead, and make clojuredev restart a new one if that happens. > > Thanks, this is very helpful to me Yes, to me too, -- Laurent > P > > ... skipping the top > > >>> This bridge function runs on the eclipse JVM, and calls a server we > >>> systematically install in the remote JVM when the user launches his > >>> project. > > >>> The code for the client part is here : > >>>http://code.google.com/p/clojure-dev/source/browse/clojuredev/trunk/s... > >>> The code for the server part is here : > >>>http://code.google.com/p/clojure-dev/source/browse/clojuredev/trunk/s... > >>> (and yes, it's yet another variation on the repl over socket) > > >> Thanks, I shall take a look at this. > > >> However, if there is only one Clojure image used for references and the > >> like, what happens if someone calls an infinite loop, or infinite > >> recursion, in a file. Does the Clojure server hang/blow up? How do you > >> detect it/protect from it? > > > No, currently, clojuredev's dynamism is tied to an existing (and > > visible via its REPL console) launched configuration. > > It is this configuration that is used. > > > So the user has only access to the launched JVM, and if he breaks it, > > then he just has to click on the "stop VM" button on the classic > > console view. > > > Was that your question ? > > >> For example, I was using the SmallSnake code for testing, and when that > >> file is loaded, it pops up a window and runs a process forever. I don't > >> want that to happen, just because someone included that file in their > >> IntelliJ project. > > >> This must be a problem common to all Swank based IDEs. What is the > >> "Clojure way" here? --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---