Running Clojure?

Clojure classpath or macro errors wasting a morning? We bring it back.

Clojure code bases are usually small, dense, and written by the same two engineers who are no longer around. The problems we see are rarely bugs in the code. They are classpath conflicts from a fifteen year old transitive, a macro someone wrote once and nobody wants to touch, or a REPL driven workflow that drifted from source. We read the REPL, read the project files, and put the thing back on a path your current team can maintain.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

clj-startup.log

still broken

What it is

Clojure at a glance

Clojure is a Lisp that targets the JVM, JavaScript through ClojureScript, and the CLR through ClojureCLR. Rich Hickey released the first version in 2007 with a focus on immutability, functional programming and a pragmatic relationship with host platforms. Data is values; code is data; state is explicit and rare.

The language is used heavily in fintech, in data pipelines where immutable reasoning matters, and in product teams that want a small language a small team can own. Its tooling has settled around deps.edn and the Clojure CLI, with Leiningen still common in older projects. ClojureScript ships to browsers, often paired with Reagent, Re-frame or Rum.

Type
Dynamic, functional Lisp on the JVM
First released
2007 initial release
License
Eclipse Public License 1.0, open source
Maintained by
Rich Hickey and Clojure core contributors
Typically used for
Fintech backends, data pipelines, small focused teams that value stability

The honest version

Clojure pros and cons

No technology is all upside. This is where Clojure earns its place and where it tends to cause trouble.

Where Clojure is strong

  • Immutability by defaultPersistent data structures are the normal case, not the opt in. Whole classes of bugs around shared mutable state simply cannot happen in idiomatic code.
  • The REPL is central, not a side toolRunning code in the live process is how Clojure is written. Debugging real production problems can often be done against a running instance safely.
  • Small, stable coreThe language has moved slowly and carefully. Code written against 1.3 in 2011 often still runs under 1.11 with no changes.
  • Great JVM interopEvery Java library is available. Kafka, JDBC drivers and internal company jars are one import away and need no wrapper.
  • Clojure spec and Malli for data contractsRather than types in the compiler, structured data assertions at function and system boundaries. Teams that lean into it catch a lot.
  • ClojureScript for the browserThe same language, mostly the same core library, targeting a different runtime. Teams that already know Clojure can ship React UIs without a second mental model.

Where Clojure bites

  • Hiring is hardThe community is small and self selecting. Engineers who already know Clojure are often remote and particular. Teaching Clojure to a mid level Java engineer takes real time.
  • Error messages are notoriously unhelpfulStack traces walk through interop frames and macro expansions before reaching anything you wrote. Beginners spend their first weeks learning to read them.
  • Startup time on the JVM is slowShort lived scripts and CLI tools suffer. Teams end up reaching for Babashka or GraalVM native image, each with its own constraints.
  • Dynamic typing shows up at runtimeWithout spec, Malli or typed Clojure, mistakes land as ClassCastException in production rather than compile errors. The language gives you the tools but does not force them.
  • Macros are powerful and dangerousA macro that looked clever in 2016 is now the thing nobody on the current team will touch. Macros resist IDE tooling, refactoring and new engineers.
  • The ecosystem is narrow outside the coreSpecific libraries for niche domains are often one maintainer away from unmaintained. Going off the beaten path costs more than it would in Java or Kotlin.

Sound familiar?

Common Clojure problems we fix

The Clojure problems that bring people to us, and what you have once each one is fixed.

Could not locate my_ns on classpath

A namespace will not load at startup

A deps.edn alias overriding the paths vector, a build step that did not include the cljc source, or a hyphen vs underscore mismatch between the file and the namespace declaration.

Classpath assembled correctly

Syntax error macroexpanding clojure.core/let

A macro is expanding to invalid code

A thread first used inside a thread last, a quoted form that should be unquoted, or a binding vector that lost a value in the middle. Stack traces point into the macro's own body rather than yours.

Macro behaves on every input

spec assertion failed

Spec or Malli is rejecting data in production

A map that used to have a key, a value that is now nil, or an upstream service that changed its response shape. Specs are doing their job; the question is what to loosen and what to fix at the source.

Boundary contracts honest

Reflection warning

The code is slow because of reflection on hot paths

Interop calls without type hints force reflection on every invocation. Not a correctness bug, but a 10x performance tax that only shows up under load.

Hot paths free of reflection

GC overhead limit exceeded during AOT compile

AOT compilation is blowing up the JVM

A large project with heavy macros and uberjar output pushing the compiler out of memory. Raising heap helps once; shrinking the AOT surface helps for good.

Build back inside the heap

nREPL server started

REPL driven code has drifted from source

Functions redefined at a REPL, instance state that only exists because somebody evaluated an expression once, and a production image nobody can reproduce from the repo.

Repo matches the running process

ClassCastException java.lang.Long cannot be cast to String

Dynamic types biting at runtime

A function that assumed a shape it never actually enforced. Adds a spec or Malli schema at the boundary, finds the three other places making the same assumption.

Contracts applied at boundaries

What we do

Clojure help, from REPL to retainer

Call us for one broken namespace, or let us own the Clojure estate.

Rescue
A deps.edn that will not resolve, a macro nobody can read, or a service inherited from a long gone contractor. We stabilise and map it.
Leiningen to deps.edn migration
Old Lein projects moved onto the tools.deps CLI with the same dependency surface, so CI and tooling line up with the current community.
Spec and Malli adoption
Structured contracts at function and system boundaries so runtime errors stop surprising people. Written against real payloads, not idealised examples.
ClojureScript and front end work
Reagent and Re-frame apps, shadow-cljs build pipelines, and React interop sorted so the browser bundle is as predictable as the backend.
Performance work
Reflection warnings cleared, transducers where loops were sloppy, and JVM tuning for long running services that drift under load.
Managed Tech
An ongoing agreement that covers upgrades, dependency hygiene, REPL driven incident response and documentation that stays in step with what the code actually does.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Clojure alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Clojure questions

Something else? Call+1 737 727 7327

Can you take over a Clojure code base from a previous team?

Yes, this is where many engagements begin. We start with a dependency and namespace map, confirm the build is reproducible, and only then make behavioural changes. Clojure projects are usually small enough that a careful first week pays for itself several times over.

Should we move from Leiningen to deps.edn?

In most cases, yes. The Clojure CLI with deps.edn is the direction the community has taken, tooling targets it first, and the migration is usually straightforward once alias and uberjar needs are mapped. We do it in a branch and prove parity before anything is merged.

Why are our Clojure errors so hard to read?

Clojure stack traces walk through Java frames, macro expansions and lazy sequences before reaching user code. We teach teams to read them, and we add spec or Malli at the boundaries so errors surface closer to where they were caused.

Is Clojure a good choice for a new project?

For a small team that will own the service for years, often yes. For a team that will churn through engineers quickly, the hiring and onboarding cost is real and should be factored in. We are happy to say so plainly before you commit.

Can you help with ClojureScript and Re-frame?

Yes. Many of the trickier Clojure engagements turn out to be on the ClojureScript side, with shadow-cljs build issues, React interop, or Re-frame subscriptions that have drifted from the app db. We work on both ends.

How much does Clojure help cost?

The quote is at no charge. Share the deps.edn, the stack trace, or a link to the repo and we come back with a price before any commits land.

Free estimate

Clojure giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.