Error formatting macro: pagetree: java.lang.NullPointerException
Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

There are various situations you get into in Clojure where the easy way out is "just restart the REPL." This is unfortunate, because

  • startup time is slow
  • often REPLs have a ton of useful context built up

I believe these problems could be entirely solved in a contrib library of helper functions for REPL development. This a significantly better than making changes to Clojure, which must pass a high bar and be carefully assessed for possible affects on exiting code. It is also consistent with Rich's desire to more clearly delineate development vs. production functionality.

Some of problems to be solved (please add to these):

  • reloading of multimethods
  • reloading of records/types that implement a protocol
  • removal of "dead" vars
  • destroying/recreating stateful objects (threads, sockets, files, etc.)
  • Adding new dependencies to my Leiningen project. Solved by pomegranate ? Visible enough ? (added by Laurent Petit)

  • Infinite (or approaching infinite) loops

Possible Contributions to this Effort

  • tools.namespace contrib library 
    • Handles reloading at the namespace level
    • Needs to reach in and modify the private Var clojure.core/*loaded-libs* in order to truly "unload" a library
    • Ensures correct reload order by statically examining namespace dependencies
    • Also removes "dead" Vars that have been deleted from source files.
  • Pomegranate
    • Clojure interface to the Aether library, a general-purpose Jave API to Maven repositories and dependency resolution