Liking cljdoc? Tell your friends :D

Developer Guide

Audience

You want contribute to, or learn about, the development of the ordered library.

Supported Environments

ordered is verified on each push on macOS, Ubuntu and Windows via GitHub Actions.

Scripts run on GitHub Actions automatically discover what versions of Clojure to test via auto-discovery of :clojure-* aliases in deps.edn. GitHub Actions tests will cover all versions.

JVM tests cover supported LTS JDKs and the current latest JDK.

Prerequisites

  • Please read the Contributing Guidelines

  • Java JDK 11 or above (Clojure 1.13+ required JDK 17+)

  • Current Clojure CLI

    • Note that ordered itself supports Clojure v1.10.3 and above

  • Current Babashka

Babashka Tasks

All scripts are written in Clojure and invoked via babashka tasks. This gives us a cross platform scripting language that is familiar, fun and consistent.

To see all available tasks with a short description run:

bb tasks

To run a task, for example, the test-clj task:

bb test-clj

Usage help for a task is requested via --help, for example:

bb test-clj --help

Tasks are described throughout this document.

REPLs

To launch a nREPL server:

bb dev-jvm

From your IDE, cider connect clj to this REPL server.

For a nREPL server that also includes ClojureScript support:

bb dev-cljs

From your IDE, cider connect cljs to this REPL server.

Clean

Sometimes you want to turf any local build work and caches, you can do so via:

bb clean

Unit tests

Unit tests can be run locally on your dev box. Some tests require a specific os and jdk, you will see warnings if a test is skipped for your current environment.

bb test-clj
bb test-cljs

Checking for Outdated Dependencies

To see what new dependencies are available, run:

bb outdated

This task uses antq.

Linting

We use clj-kondo and eastwood to lint ordered source code.

We fail the build on any lint violations. The CI server runs:

bb lint-kondo
bb lint-eastwood
bb lint-docstrings

and you can too.

The lint-kondo task will build the clj-kondo cache when it is missing or stale. If you want to force a rebuild of the cache run:

bb lint-kondo --rebuild

The lint-docstrings task checks that public API docstrings match between .clj and .cljs implementations. Moving to .cljc would avoid this, but for now we want to avoid this refactor.

We don’t run it on CI, but you can also optionally lint with splint:

bb lint-splint --help

Can you improve this documentation? These fine people already did:
Lee Read & Noa Bogart
Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close