Liking cljdoc? Tell your friends :D

hive-build.promote.api-surface

A namespace's PUBLIC surface as data, and the difference between two of them.

Pure: takes already-read top-level forms, returns values.

Surface shape: {"ns/name" {:kind :def|:defn|:defmacro|:defprotocol|:defrecord :arities #{0 1 :variadic} :methods {"method" #{1 2}}}}

What counts as public: anything a downstream repo can compile against — defn/def/defmacro without ^:private (and not defn-), plus every protocol and its method arities. Private vars are excluded on purpose: they are not part of the contract and freezing them would freeze refactoring.

A namespace's PUBLIC surface as data, and the difference between two of them.

Pure: takes already-read top-level forms, returns values.

Surface shape:
  {"ns/name" {:kind :def|:defn|:defmacro|:defprotocol|:defrecord
               :arities #{0 1 :variadic}
               :methods {"method" #{1 2}}}}

What counts as public: anything a downstream repo can compile against —
`defn`/`def`/`defmacro` without ^:private (and not `defn-`), plus every
protocol and its method arities. Private vars are excluded on purpose: they
are not part of the contract and freezing them would freeze refactoring.
raw docstring

breaking?clj

(breaking? diff)

True when diff contains anything a consumer could not survive.

True when `diff` contains anything a consumer could not survive.
sourceraw docstring

describeclj

(describe diff)

One line per breaking change, for a human reading CI output.

One line per breaking change, for a human reading CI output.
sourceraw docstring

diffclj

(diff old new)

What changed from old surface to new.

{:removed [qn...] — a public name that no longer exists :arities-lost [{...}] — a public fn that dropped an arity :methods-lost [{...}] — a protocol method removed or narrowed :kind-changed [{...}] — e.g. a defn became a def :added [qn...]} — additive; never a violation

What changed from `old` surface to `new`.

{:removed [qn...]            — a public name that no longer exists
 :arities-lost [{...}]       — a public fn that dropped an arity
 :methods-lost [{...}]       — a protocol method removed or narrowed
 :kind-changed [{...}]       — e.g. a defn became a def
 :added [qn...]}             — additive; never a violation
sourceraw docstring

merge-surfacesclj

(merge-surfaces surfaces)

One surface map for a whole source tree.

One surface map for a whole source tree.
sourceraw docstring

ns-name-ofclj

(ns-name-of forms)

The namespace symbol declared by forms, or nil.

The namespace symbol declared by `forms`, or nil.
sourceraw docstring

surfaceclj

(surface forms)

Public API surface of one namespace's forms.

Public API surface of one namespace's `forms`.
sourceraw docstring

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