Re: :reload does not always work correctly in leiningen
I normally use a set utility functions to reload individual namespaces so I don't lose state. This almost always suffices for day-to-day work. But, if the REPL is still acting shady, then I'll use refresh. Anything is better than having to wait out a REPL reboot. On Sat, Feb 28, 2015 at 10:43 AM James Reeves ja...@booleanknot.com wrote: The :reload directive re-evaluated the namespace, but does not remove any existing definitions, or reload any dependent namespaces. This may be the cause of your strange results. The tools.namespace library https://github.com/clojure/tools.namespace contains a refresh function that will clear and reload your namespaces from scratch. This doesn't take into account things like background threads, but is generally more reliable that the :reload directive when working in a REPL. - James On 28 February 2015 at 14:25, Cecil Westerhof cldwester...@gmail.com wrote: I discovered: (require 'project.core :reload) Very handy indeed and a big time saver. But it does not always work correctly. At a certain moment I got strange results. An exit and a new 'lein repl' solved the problems. -- Cecil Westerhof -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
:reload does not always work correctly in leiningen
I discovered: (require 'project.core :reload) Very handy indeed and a big time saver. But it does not always work correctly. At a certain moment I got strange results. An exit and a new 'lein repl' solved the problems. -- Cecil Westerhof -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: :reload does not always work correctly in leiningen
does not always work correctly in what context? In the REPL, `(require '[my.ns :as mine] :reload-all)` should work. `defonce` and `defmulti` might also be causing confusion. You could also look into `clojure.tools.namespace.repl` (https://github.com/clojure/tools.namespace#reloading-code-usage). On Saturday, February 28, 2015 at 9:25:56 AM UTC-5, Cecil Westerhof wrote: I discovered: (require 'project.core :reload) Very handy indeed and a big time saver. But it does not always work correctly. At a certain moment I got strange results. An exit and a new 'lein repl' solved the problems. -- Cecil Westerhof -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: :reload does not always work correctly in leiningen
The :reload directive re-evaluated the namespace, but does not remove any existing definitions, or reload any dependent namespaces. This may be the cause of your strange results. The tools.namespace library https://github.com/clojure/tools.namespace contains a refresh function that will clear and reload your namespaces from scratch. This doesn't take into account things like background threads, but is generally more reliable that the :reload directive when working in a REPL. - James On 28 February 2015 at 14:25, Cecil Westerhof cldwester...@gmail.com wrote: I discovered: (require 'project.core :reload) Very handy indeed and a big time saver. But it does not always work correctly. At a certain moment I got strange results. An exit and a new 'lein repl' solved the problems. -- Cecil Westerhof -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: :reload does not always work correctly in leiningen
2015-02-28 17:26 GMT+01:00 Sam Raker sam.ra...@gmail.com: does not always work correctly in what context? One time when I did the reload my forms got an empty area around them. After an exit and a new start everything was OK again. I use it since today, so I do not know if it is a gremlin or a real problem. I just keep using it and if I get strange results I just have to remember to exit and start again. If I need to restart once every four hours, it still is a good improvement. I just thought to mention it: if a lot of people would reply with: yes, I have the same problem, then we would know that something was broken. For the moment I think it was a gremlin and not a real problem. On Saturday, February 28, 2015 at 9:25:56 AM UTC-5, Cecil Westerhof wrote: I discovered: (require 'project.core :reload) Very handy indeed and a big time saver. But it does not always work correctly. At a certain moment I got strange results. An exit and a new 'lein repl' solved the problems. -- Cecil Westerhof -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.