A Clojure library for live-recompiling Java classes from the REPL without restarting.
Virgil is a Clojure library that allows developers to recompile Java source files on the fly from the REPL without restarting. It solves the problem of having to reload the entire REPL every time Java code changes in a mixed Clojure/Java project, enabling a smoother development workflow.
Clojure developers who work on projects that include Java code, particularly those who want to maintain an interactive REPL-driven development process without interruptions.
Developers choose Virgil because it seamlessly integrates Java compilation into the Clojure REPL workflow, eliminating the need for manual restarts and supporting tools like clj-reload for full code refresh.
Recompile Java code without restarting the REPL
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically recompiles Java classes on file changes or manual trigger via functions like `watch-and-recompile`, eliminating the need to restart the REPL during development.
Loads newly compiled classes into Clojure's DynamicClassLoader, allowing immediate use in the REPL without restarting, as described in the 'What happens when I recompile a class?' section.
Works seamlessly with reload tools like clj-reload and tools.namespace via post-hooks, enabling full code refresh for dependent Clojure code after Java recompilation.
Supports compiler options and verbose output through arguments like `:options` and `:verbose`, providing flexibility for debugging and customization.
Old class instances don't automatically upgrade, and imported names stick to old versions until namespaces are recompiled, requiring additional steps like using reload tools, which adds complexity.
Not recommended for production due to reliability concerns and dependency on JDK tools like javax.tools, with the README advising explicit javac use during builds for better assurance.
Requires manual setup with reload tools and configuration, such as setting up post-hooks, which can be non-trivial for some development environments.