Giter VIP home page Giter VIP logo

virgil's Introduction

Do you tarnish your Clojure with the occasional hint of Java? Have you become indescribably tired of reloading your REPL every time you change anything with a .java suffix? Look no further.

In your project.clj or ~/.lein/profiles.clj, add this:

{:plugins [[lein-virgil "0.1.9"]]}

Now, as if by magic, every time the .java files on your :java-source-paths change, they will be recompiled within your REPL and all the namespaces that rely on those files will be reloaded. A helpful message will be printed out, including any compilation errors you may have introduced along the way (these are written to stdout, so they may show up in a different buffer than your REPL).

Happy tarnishing.

Boot

For Boot, add this to your build.boot:

(set-env! :dependencies '[[virgil "0.1.9"]
                          ...])

(require '[virgil.boot :refer [javac*]])

Now you have the option to run Virgil manually from the REPL. Virgil will automatically scan your :source-paths for Java files. This will compile Java classes once:

boot.user=> (boot (javac*))

Or you can enable automatic background recompilation like in lein-virgil:

boot.user=> (def f (future (boot (comp (watch) (javac*)))))
;; Then, to disable:
boot.user=> (future-cancel f)

In your build pipelines, you can continue to use the Boot's built-in javac task.

javac* task supports the following parameters:

  • :verbose — print every class name that is compiled.
  • :options — a vector of strings that is passed to Java compiler, same as to javac binary. E.g., you can use (javac* :options ["-Xlint:unchecked"]) to print additional warnings from the compiler.

license

Copyright © 2016 Zachary Tellman

Distributed under the MIT License

virgil's People

Contributors

agilecreativity avatar aiba avatar alexander-yakushev avatar jumarko avatar radicalzephyr avatar schmir avatar smee avatar ztellman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.