# How to get started working on Clojure itself

**URL:** https://clojureverse.org/t/how-to-get-started-working-on-clojure-itself/2817
**Category:** How to?
**Created:** [September 10, 2018, 12:29pm UTC](https://clojureverse.org/t/how-to-get-started-working-on-clojure-itself/2817 "2018-09-10T12:29:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dpsutton](https://clojureverse.org/letter_avatar_proxy/v4/letter/d/ec9cab/32.png) [@dpsutton](https://clojureverse.org/u/dpsutton)
#### Post date: [September 10, 2018, 12:29pm UTC](https://clojureverse.org/t/how-to-get-started-working-on-clojure-itself/2817/1 "2018-09-10T12:29:37Z")

</div>

I’m wanting to learn how to work on Clojure itself. I’ve got IntelliJ (without Cursive) set up to work with the java codebase but now I want to know how people work on the Compiler itself. I’m interested to hear experiences and resources about

- general overview of how the compiler works
- how to set up workflow to create artifacts and test them
- how to get a repl running in the Clojure codebase so you can quickly interact
- how to profile the results of changes

I’m reading lots of tickets in Jira and git commits but its still quite a lot. Just wondering what people here have done to get involved. Thanks.

---

<div class="post-metadata">

### Author: ![alexmiller](https://clojureverse.org/user_avatar/clojureverse.org/alexmiller/32/4805_2.png) [@alexmiller](https://clojureverse.org/u/alexmiller)
#### Post date: [September 10, 2018, 8:58pm UTC](https://clojureverse.org/t/how-to-get-started-working-on-clojure-itself/2817/2 "2018-09-10T20:58:11Z")

</div>

Unfortunately, there are few resources about how the compiler works. I wish it were otherwise (but wishing does not create time to change that). There are a few good intro conference talks about it ([https://www.youtube.com/watch?v=8NUI07y1SlQ](https://www.youtube.com/watch?v=8NUI07y1SlQ), [https://www.youtube.com/watch?v=2SGFeegEt9E](https://www.youtube.com/watch?v=2SGFeegEt9E) come to mind) and I think some of the tools.analyzer talks and resources are good intros too ([https://www.youtube.com/watch?v=KhRQmT22SSg](https://www.youtube.com/watch?v=KhRQmT22SSg)). The Clojure compiler is, however, intentionally not very complicated.

Re workflow, there are instructions for build and test in several ways in the readme: [https://github.com/clojure/clojure/blob/master/readme.txt](https://github.com/clojure/clojure/blob/master/readme.txt) (shocking I know :). Just `mvn clean install` is enough to build a deploy a snapshot version with your local changes that you can use from other projects.

You can use that jar in a repl with just `clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.0-master-SNAPSHOT"}}}'`. (Note that right now snapshot deps are only retrieved from Maven daily, so you’ll need to remove from ~/.m2/repository/org/clojure/clojure/… then add -Sforce to force a re-load (this is something I expect to fix in clj soon).)

Another option is to set up a deps.edn right in the clojure project itself (I do this for some stuff) that looks like this:

```auto
{:deps
 {org.clojure/clojure {:mvn/version "1.10.0-alpha7"}
  org.clojure/test.check {:mvn/version "0.9.0"}
  criterium {:mvn/version "0.4.4"}}
 :aliases
 {:dbg {:classpath-overrides {org.clojure/clojure "target/classes"}}}}

```

Then use `clj -A:dbg` to run a Clojure repl.

And then another another way to do it is to connect a Clojure repl via an IDE (I do this via Cursive). That’s useful because you can actually walk across both Java and Clojure code.

I typically use Criterium to profile changes with the `bench` or `quick-bench` functions.

---

<div class="post-metadata">

### Author: ![system](https://clojureverse.org/uploads/default/original/2X/5/51079bf9e4b7d9466242c06cf1e43b9f8bd6da14.png) [@system](https://clojureverse.org/u/system)
#### Post date: [March 12, 2019, 8:58am UTC](https://clojureverse.org/t/how-to-get-started-working-on-clojure-itself/2817/3 "2019-03-12T08:58:11Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
