• Stars
    star
    274
  • Rank 144,951 (Top 3 %)
  • Language
    Clojure
  • Created over 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

your own personal JVM psychopomp

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

More Repositories

1

lamina

not under active development - event-driven workflows for clojure
Clojure
708
star
2

automat

better automata through combinators
Clojure
586
star
3

rhizome

simple graph and tree visualization
Clojure
446
star
4

penumbra

not under active development - idiomatic opengl bindings for clojure
Clojure
353
star
5

vertigo

heterogeneous structs for clojure
Clojure
208
star
6

riddley

code-walking without caveats
Clojure
193
star
7

clj-tuple

efficient small collections for clojure
Java
179
star
8

narrator

expressive, composable stream analysis
Clojure
153
star
9

proteus

local. mutable. variables.
Clojure
111
star
10

sleight

whole-program transformations in clojure
Clojure
98
star
11

calx

not under active development - idiomatic opencl bindings for clojure
Clojure
84
star
12

collection-check

fuzz testing for alternate clojure data structures
Clojure
64
star
13

pushkin

shall we play a game?
Clojure
59
star
14

immutable-bitset

space-efficient immutable integer sets
Clojure
51
star
15

immutable-int-map

a map optimized for integer keys
Clojure
40
star
16

aloha

a simple, friendly webserver
Clojure
36
star
17

cambrian-collections

a veritable explosion of data structures
Clojure
29
star
18

cantor

not under active development - primitive math for clojure
Clojure
26
star
19

clj-radix

a persistent radix tree, for efficient nested maps
Clojure
21
star
20

lein-jammin

a window into your stuck process
Clojure
18
star
21

everything-will-flow

necessary code for my upcoming clojure/west 2015 talk
Clojure
17
star
22

duel

a testing ground for programs that play go
Clojure
10
star
23

bizarro-collections

you got your clojure semantics in my mutable hash-map
Java
7
star
24

ergo

a monte-carlo simulator for computer go
C++
5
star
25

scrawl

the graphical equivalent of the fibonacci sequence
Clojure
4
star
26

java9-failure

Clojure
1
star
27

aleph.io

static website for aleph
CSS
1
star