Build & tooling commands¶
just-makeit build [dir]¶
Build the C extensions and package a wheel.
Configures CMake (if not already done), builds the C extensions, then
packages the wheel with
just-buildit. just-buildit is
not a just-makeit dependency: pip install just-buildit first, or the command
stops and says so. Must be run from a project directory containing
pyproject.toml.
just-makeit test¶
Build (if needed), then run all tests.
- CTest runs the C tests (
native/tests/). - pytest, if it is importable in the running Python (else
unittest discover), runs the Python tests undersrc/. Extra arguments are passed to pytest:just-makeit test -k fir.
just-makeit dry-run¶
Show what would be compiled and packaged without running any build steps.
Output includes the list of C source files and the full cmake configure
command that just-makeit build would invoke.
just-makeit bench [comp …]¶
Build the project, run the C and Python benchmarks, and save a dated snapshot
under benchmarks/history/ so performance history lives in git.
just-makeit bench # everything runnable, both sides, saves a snapshot
just-makeit bench fir biquad # only these
just-makeit bench util # ...including a non-component benchmark
Each run rebuilds via cmake, executes every bench_<comp>_core C binary and
the pytest-benchmark suite under src/, prints a stats table per side with a
Δ column against the previous snapshot, and writes two immutable files —
<tag>.json (Python) and <tag>-c.json (C), where <tag> is a UTC timestamp.
Commit them to keep the history.
Every row says what it counts (gh-2282). A C row is rounds timings, each
of one round of iterations units, and the benchmark names the unit when it
records the row. The unit is a word: jm_bench.h defines the ones jm's
generated benchmarks use (JM_BENCH_SAMPLE, JM_BENCH_CALL,
JM_BENCH_FRAME), and a benchmark of your own passes any other without
editing the vendored header:
/* a steps() call over BENCH_N samples, timed ITERATIONS times */
jm_bench_add_unit(&_bench, "steps", times, ITERATIONS, BENCH_N,
JM_BENCH_SAMPLE);
/* an FFT of NFFT bins a round */
jm_bench_add_unit(&_bench, "fft", times, ITERATIONS, NFFT, "bin");
A unit is up to 31 characters of [a-z0-9_], singular; anything else stops
the run, naming the row and quoting the offending unit.
jm_bench_add(&_bench, name, times, rounds, iters) still compiles and records
calls. In the JSON, stats min, max, mean, stddev and median stay
per round, and each gains a <stat>_per_unit beside it (divided by
iterations). ops is units per second. extra_info names the unit and
its rate_unit, which jm_bench_rate_label derives in one place: Sa/s for
a sample, <unit>s/s otherwise (calls/s, bins/s).
A sample row adds MSa_s. The table's Per column says what its times
cover, and Throughput is in the row's own unit, as the JSON states it. A
row that names no unit is shown for what its producer guarantees: a
pytest-benchmark row per call, and a C row from an older jm_bench.h per
round, in ops/s.
So the same five-argument call reads differently by header: per round in
ops/s against an older jm_bench.h, per call against this one. A project
that re-vendors the header moves every row that counts samples (or bins,
taps) to jm_bench_add_unit in the same change, or those rows report calls.
What gets run is what gets built (gh-1023). The C side is not limited to
manifest components. jm takes every native/benchmarks/bench_<X>_core.c that
some build file compiles, so a benchmark for a [project] c_deps directory —
whose CMakeLists.txt is hand-written, since jm emits only the
add_subdirectory line — is picked up the day it is written, with nothing to
declare. Discovered names are listed as extra at the top of the run, and are
selectable positionally like any component.
This mirrors the Python side, which has always discovered by pytest
collection rather than by declaration, and it is the reason there is no
[project.bench] key for it: a benchmark is not manifest-owned
(jm status --check does not track one), and a list you must remember to
append to goes stale in exactly the silent way this fixed.
Discovery reads build files as text, so it is a heuristic: a target named
only inside a comment still looks built. A discovered name is therefore
allowed to be wrong but not allowed to be expensive — if its target does not
build, jm prints skip and carries on, where a manifest component's target
failing to build is still a hard error. The reference match is word-anchored,
so bench_fir_core is not confused with bench_fir_core_simd.
jm does not read build files under vendor/ (gh-1031), any more than it
reads build/. A vendored dependency is somebody else's build system, and
reading it was actively harmful: one vendored file(GLOB ...) stood the scan
down for the whole tree, which also silenced the UNBUILT detector below.
jm deliberately does not try to work out whether a given wildcard could reach
the directory being scanned. That would mean inferring a foreign build
system's semantics, and it fails in the expensive direction — a pattern read
as irrelevant that in fact matches makes jm call a compiled file unbuilt.
third_party/ and external/ are the same situation under a different name
and are still read; that is a known gap with an obvious fix, not a wrong
answer.
The one case jm cannot answer at all is a build file that enumerates sources by
wildcard — file(GLOB ...) makes "is this compiled?" unanswerable by reading.
There the scan stands down to manifest components only and says so, rather
than quietly running fewer benchmarks than the tree holds. It is the same
stand-down the UNBUILT detector makes, for the same reason — and since
gh-1033 that one says so too, as UNCHECKED.
Gate mode. --check compares against a baseline instead of saving and
exits non-zero on a regression, so CI can fail a change that slows a kernel
down:
--check fails on two things, not one. The obvious one is a benchmark that got
slower. The other is a benchmark that stopped running (gh-1029): a name the
baseline carries and this run did not produce is reported as missing and
fails the gate.
That second half exists because the comparison used to be keyed on the current
run alone, which made the gate's coverage a function of whatever the run
happened to produce — so shrinking it always looked like success. A target that
stopped building, a binary that wrote no JSON, a kernel dropped from main(),
or a benchmark renamed (retiring the old name and reporting the new one as
new, which never fails) all read as "no regression".
A deletion you meant is a deliberate act, so it carries a flag:
--allow is the whole escape hatch — the same one a deliberately slower
benchmark uses. The noise floor does not apply here: it answers "is this timing
trustworthy?", and an absent benchmark has no timing to distrust.
Slow hardware: the run budget (gh-1687). Each benchmark run — one
bench_<comp>_core binary, or the one pytest --benchmark-only — gets 600 s
by default. That was sized on a desktop core; a Cortex-A53-class board runs the
same binary 10–20× slower, so the budget is yours to set:
A run past the budget costs that benchmark and nothing else: it is killed
and reported as timeout bench_<comp>_core, the remaining benchmarks still
run, the ones that finished are saved (the snapshot lists what timed out under
"timed_out"), and the command then exits 1 naming it — so the numbers you did
get are kept and the failure is still loud. Under --check the timed-out
benchmark's baseline entries are missing, and the gate fails. The timed-out
binary's own sections are lost: jm_bench_write_json writes once, at the end
of main. The Python side is one pytest run, so a timeout there loses the
Python results for that run.
The builds jm bench drives are not timed: a cold build on the same board
took 603 s, and a build that is slow has not failed. Bound a CI job's wall
clock with the job's own timeout-minutes:.
A benchmark that fails (gh-2189). A bench_<comp>_core that exits
non-zero, dies of a signal, or exits 0 without writing its JSON (or writing one
that does not parse) is reported as failed bench_<comp>_core (<why>), with
its stderr quoted beneath. So is a target that built but whose binary jm cannot
find. On the Python side, a pytest run that exits other than 0 (or 5,
nothing collected) is reported as failed pytest <file> (exit N): a benchmark
that raised, or whose test failed after it ran. pytest's own report, printed
above it, names the test. Like a timeout, a failure costs that benchmark and
nothing else. The remaining benchmarks still run, the ones that finished are
saved (the snapshot lists the failure under "failed"), and the command then
exits 1 naming it. A JSON that a failed run did write is not read, since the
run said it is not good; pytest-benchmark keeps the timing of a test that
failed after its benchmark ran. Under --check the failed benchmark's
baseline entries are missing, the JSON document lists it under "failed",
and the gate fails. There is no flag that skips a failure; to leave the C
benchmarks out of a run, name the components you want, or pass
--python-only.
silent from the artifact (gh-1691). A benchmark that runs and writes an
empty "benchmarks": [] is named as silent bench_<comp>_core. That is
read from the JSON the binary wrote, so it holds however the source records —
including through a helper of your own that wraps jm_bench_add. It is the
authoritative version of the SILENT advisory jm status gives from source.
Arguments
| Argument | Description |
|---|---|
comp … |
Restrict to the named components (default: all). |
--tag TAG |
Snapshot tag (default: a UTC timestamp). |
--c-only / --python-only |
Run only one benchmark side. |
--check |
Compare against a baseline and exit 1 on regression; saves nothing. |
--threshold N |
Fractional slowdown that fails --check (default 0.10 = 10%). |
--baseline TAG |
Baseline snapshot for --check (default: the latest). |
--allow NAME |
A benchmark exempt from --check (repeatable). |
--json |
With --check, emit the comparison as JSON. |
--timeout S |
Seconds one benchmark run may take before it is skipped and the run fails at the end (default: [project.bench] timeout, else 600; 0 = no limit). |
make compile-commands and make tidy¶
make compile-commands copies cmake's compile database to the project root,
where clangd and clang-tidy look for it:
It re-configures and re-copies every time. That is deliberate — the database tracks the CMake source list, so a rule keyed on a timestamp goes stale the moment you add a component.
make tidy runs clang-tidy over exactly the translation units cmake compiles,
refreshing the database first:
The file list comes from the database rather than a directory walk, so a
generated .c that no CMake target builds is never linted into a false sense
of coverage.
The scaffolded .clang-tidy opts into bugprone-*, cert-* and
clang-analyzer-*, with the checks that misfire on jm's own layout turned off
and each one annotated with the construct it misfires on.
It sets WarningsAsErrors: "*", so make tidy is a real gate — every
finding is an error.
It was off while jm's own generated C still had findings, because a make tidy
that fails on a project you just created is the fastest way to teach someone
never to run it again. That is fixed
(#944): a scaffold
with --perf, a module, a standalone object and a C app returns zero, measured
rather than assumed. A freshly scaffolded project reports clean; an
existing one very likely will not on the first run, and those findings are
about your code.
If a newer clang-tidy adds a check that fires on generated code, comment the line out rather than working around the diagnostic — the file is yours (jm writes it once and never rewrites it), and a scaffold going red on a toolchain bump is not your bug to fix.
make coverage¶
Generate C and Python coverage HTML reports. Run from the project root after scaffolding with just-makeit.
Requires lcov/genhtml for the C side and pytest-cov for Python:
sudo apt-get install lcov # Debian/Ubuntu
brew install lcov # macOS
sudo pacman -S lcov # Arch/CachyOS
uv add --dev pytest-cov
What it does:
- Compiles a separate
build/cov/tree with-DCMAKE_C_FLAGS="--coverage -O0"— the Release build inbuild/is untouched. - Runs CTest against the coverage binary.
- Collects
.gcdafiles withlcov --capture, strips system and test paths, and rendersdocs/coverage/c/index.htmlviagenhtml. - Runs
pytest --cov=<package> --cov-report=html:docs/coverage/python.
Both reports land under docs/ (already in .gitignore).
make docs¶
Build both C and Python API documentation. Run from the project root.
Requires doxygen for the C side and zensical + mkdocstrings-python for Python:
sudo apt-get install doxygen # Debian/Ubuntu
brew install doxygen # macOS
uv add --dev zensical mkdocstrings-python
C API — Doxygen
Reads Doxyfile (generated by just-makeit, edit freely) and produces
docs/doxygen/html/index.html. Covers every *.h and *.c under
native/inc/ and native/src/. JavaDoc-style /** @brief ... */ comments
in your C source appear automatically.
Python API — Zensical + mkdocstrings
Reads zensical.toml (generated by just-makeit) and produces site/index.html.
The generated docs/api.md page uses a single mkdocstrings directive:
mkdocstrings introspects the compiled extension and renders docstrings from
PyDoc_STR(...) in the C binding.
Serve live with hot-reload:
just-makeit perf¶
Upgrade an existing project to use performance annotations without overwriting any user code. Must be run from the project root.
Writes native/inc/<pkg>/jm_perf.h and native/inc/<pkg>/jm_simd.h, adds
#include "<pkg>/jm_perf.h" to each object header, and replaces
static inline with JM_FORCEINLINE JM_HOT on step(). Records
perf = "true" in just-makeit.toml so future object and add commands
inherit it. Safe to run on a project with a filled-in step().
Idempotent.
See Performance annotations for the full macro reference and
JM_DEFINE_STEPS documentation.
just-makeit apply¶
Reconcile the generated files with just-makeit.toml. Use this after
hand-editing the manifest, after git pull, or to materialize any files
missing from a checkout. Must be run from the project root.
just-makeit apply
just-makeit apply path/to/fragment.toml # compose an external fragment first
just-makeit apply --only=fir # reconcile one component or module
just-makeit apply --renumber mode # accept a deliberate [[enum]] renumbering
--renumber ENUM (repeatable) accepts a renumbering of [[enum]] ENUM on
purpose (gh-2941). apply keeps a record of each enum's order as it last
applied it, [project.applied_enums], and refuses a change to it that is
more than an append, because position is the C int and every value already
stored would mean another choice; status reports it as RENUMBER. Append
new values instead, bind each to a C constant with enumerators (which pins
its number, so its enum is never compared), or, with nothing stored yet,
re-record it with --renumber. The flag is refused for an enum that is not
renumbered or has no record yet.
Binding enumerators changes what a function passes to C. In a module
object's kept binding fragment, apply then names each function still passing
positions: delete each with its table row and apply again, which renders them.
Given a fragment path, apply copies the file into objects/, adds it to
include, then materializes as usual. --only=NAME restricts the
per-component regeneration to that component (or module); the aggregate files
— the package __init__.py, the root CMakeLists.txt, the umbrella header —
are still updated. See
What jm apply does.
apply follows the sacred / glue contract:
| File | On every apply |
|---|---|
<comp>_ext.c |
Glue — fully regenerated from the manifest. |
src/<pkg>/<comp>.pyi |
Glue — fully regenerated. |
native/src/<comp>/CMakeLists.txt |
Glue — fully regenerated. |
root CMakeLists.txt |
Mixed — only jm's marked blocks (components, modules, install) are rewritten; the rest is yours. |
<comp>_core.h |
Mixed — a missing method/property declaration is injected; the inline step() body and the state struct are sacred and never re-rendered. |
<comp>_core.c |
Sacred — never re-rendered. The only write is appending a stub for a manifest-declared method it lacks (gh-1294); existing bodies, steps() and lifecycle included, are never touched. |
So editing the manifest always propagates to the glue, and apply injects any
missing method/property declaration into _core.h. The struct and inline
step() stay sacred. Changing a signature in TOML — or adding a state
field — is structural: rebuild the body from the manifest with
jm regenerate (or jm add, which is regenerate specialized for state). A
new method or computed property is additive instead — jm method /
jm property inject a declaration and append a fresh stub.
apply also warns about the files it did not touch: a
native/tests/test_*_core.c or native/benchmarks/bench_*_core.c that no
build file compiles, a benchmark target jm bench never runs, and a
generated benchmark that records no measurement. The first two are marked !
because they fail jm status --check — see
Why UNBUILT gates and
Why UNRUN gates.
It also warns before rendering over a .pyi that does not parse, naming the
hand-written members that will not survive — see
Why UNPARSEABLE gates.
just-makeit regenerate <component>¶
The deliberate-refresh half of the sacred/glue contract. Deletes every file
the component owns, then re-runs jm apply to rebuild them all from the
manifest. The manifest itself is left untouched (unlike jm remove). Works
for standalone and module objects. Must be run from the project root.
git stash # best-effort splice — stash first regardless
just-makeit regenerate engine
just-makeit regenerate engine --force # skip the confirmation
just-makeit regenerate engine --discard # clean reset, no splice
By default, hand-written bodies in <comp>_core.c/<comp>_core.h
(create/destroy/reset, step(), getters/setters, method implementations) are
lifted before the sacred files are deleted and spliced back into the freshly
regenerated ones, by function name. A signature change (e.g. from jm add
growing a lifecycle function's parameter list) is detected and skipped in
favor of the fresh body rather than force an incompatible splice. Pass
--discard for the old behavior — a clean reset back to the template
scaffold, with no preservation attempt. On a module object --discard also
rebuilds the binding fragments that call into its core, its own
<module>_ext_<obj>.c and each view's, so a constructor change reaches all
of them (gh-965, gh-2073); a hand-written *_extra.c is kept. jm add and
jm remove state rebuild this way. Either way, git stash or commit
first — the splice is best-effort text matching, not a guarantee. A single
confirmation guards the deletion; --force skips it.
A regenerate that fails does not cost you the component. When the rebuild's
apply refuses after the delete — over another component's manifest row,
say — jm puts back every file it had deleted or written and says so. An
impl_file naming a file inside the component is refused before anything
is deleted, since the rebuild could not read the body back from a file it
had just removed (gh-1867).
An object in a no_generate
module is refused, by regenerate and by every command that rebuilds through
it, before anything is asked or written: jm apply writes none of that
module back, so the deletion would be all that happened (gh-2087). Its C is
yours; edit it by hand.
| Flag | Description |
|---|---|
--force |
Skip the deletion confirmation. |
--discard |
Skip the lift-and-splice; reset the sacred files to the template scaffold. |
just-makeit ci [--provider NAME]¶
Generate a continuous-integration workflow that builds the project and runs
its tests (make && make test), so a scaffolded project is CI-green as fast
as it builds and tests locally. Must be run from the project root.
just-makeit ci # GitHub Actions: .github/workflows/ci.yml
just-makeit ci --provider woodpecker # Woodpecker: .woodpecker.yml
just-makeit ci --force # overwrite an existing workflow file
The generated workflow installs the build dependencies and runs the same
build-and-test the test target drives locally. The
dependency step installs numpy, plus pytest if the project enabled pytest.
The Python versions it tests are your pyproject.toml's. The GitHub
workflow's python-version matrix is rendered from the project's
Programming Language :: Python :: 3.N classifiers -- those its
requires-python admits, since pip would refuse to install the project on
any other -- and the Woodpecker pipeline's python:3.N image is the oldest
of them. jm new writes the classifiers, one per version jm itself
supports, and the README's Python 3.N+ line from the same file's floor;
from then on the list is yours. Drop 3.9 from the classifiers and the next
jm apply rewrites the workflow's matrix to match -- that one value and
nothing else in the file, in the shape you spelled it (a one-line or
multi-line flow list, or a block list) -- while jm status --check reports
the workflow STALE until it does. A classifier requires-python refuses
gets no leg, and jm ci and jm apply name it. The workflow stays plain
YAML: nothing reads pyproject.toml when CI runs.
A project without version classifiers (one scaffolded before jm wrote them)
keeps its pyproject.toml as it is -- jm does not write into it -- and its
CI tests jm's own list; jm ci and jm apply say so in one line until you
add the classifiers. A workflow with no python-version list (a matrix it
computes itself), or more than one, is not rewritten: jm apply says so,
and jm status lists it under CI PYTHONS.
| Flag | Description |
|---|---|
--provider NAME |
github (default → .github/workflows/ci.yml) or woodpecker (→ .woodpecker.yml). |
--force |
Overwrite the workflow file if it already exists. |
just-makeit config [key value]¶
Show or edit the project configuration stored in just-makeit.toml.
Must be run from the project root.
Example output
project: my_project
version: 0.1.0
engine:
rate: double = 1.0
order: int = 4
parser:
depth: int = 8
strict: int = 1
Supported keys
| Key | Description |
|---|---|
version |
The project version. Writes [project] version and every generated copy status checks for it (pyproject.toml, bootstrap.toml, the root CMakeLists.txt's project(VERSION), the Doxyfile, <pkg>_version()), replacing only the value, and re-renders a pep723 app (gh-2069). A copy the build derives is left alone; a copy that cannot hold the value (CMake takes integers only, so a pre-release) is named and left, and stays a VERSION finding. |
just-makeit bind <component>¶
Synthesise <comp>_ext.c and <comp>.pyi by reading <comp>_core.h directly,
without consulting just-makeit.toml. This is the "point at your C and get
Python" path, for a header the manifest does not declare. Must be run from the
project root.
just-makeit bind engine # synthesise engine_ext.c from engine_core.h
just-makeit bind engine --check # exit 1 if the generated binding differs from the file on disk
jm bind parses the header for the standard just-makeit naming conventions
(<pkg>_<comp>_state_t, <pkg>_<comp>_create, <pkg>_<comp>_step, scalar
field defaults from the reset body) and renders the binding from the same
context builders the manifest-driven flow uses — so a bound _ext.c is
byte-identical to a scaffolded one.
A component the manifest declares is refused, --check included: its
binding is jm apply's, rendered from the manifest, and a warning, a
create() error or a record type is nothing a header says, so a render from
the header alone would drop it. jm bind exits 1 naming jm regenerate <comp>
and jm apply, and writes nothing (gh-2072).
With no just-makeit.toml -- a bare native/ tree beside a
pyproject.toml -- jm bind reads the project off the tree (gh-1895). The
header layout is where the header is: native/inc/<pkg>/<comp>/<comp>_core.h
(what jm new writes) or the older native/inc/<comp>/<comp>_core.h, and the
binding's #includes are spelled for that layout. The C prefix is the one the
header's _state_t declares: <prefix>_<comp>_state_t binds as
c_prefix = "<prefix>", a bare <comp>_state_t as none. When neither layout
holds the header, or both do, it exits 1 naming both paths and writes nothing.
Current scope: a state struct with scalar and opaque-pointer fields, or
a forward-declared (opaque) one; a <pkg>_<comp>_create() taking the state
fields in order, where a parameter that matches no field becomes an init
param; a scalar-in / scalar-out inline step(); getters and setters
(<pkg>_<comp>_get_<name> / <pkg>_<comp>_set_<name>); any other
<pkg>_<comp>_<verb>(state, ...) whose return type and single optional
scalar argument parse, as a method; and a verb with a
<pkg>_<comp>_<verb>_max_out sibling, as a variable-output method. A
declaration it finds but cannot parse is skipped with a warning rather than
failing the run. A method the header cannot express needs the manifest, and
once the manifest declares the component its binding is jm apply's.
--check as a CI gate: run jm bind <comp> --check in CI to ensure
the committed _ext.c never silently drifts from the header it was generated
from. Green means byte-identical; non-zero exit means regenerate and commit.
A binding that is not on disk at all is a finding too: --check exits 1 on
one line naming the _ext.c jm bind <comp> would write (gh-2101).
Not yet supported (see roadmap): methods with more than one parameter or with an array parameter, and result-struct returns.
| Flag | Description |
|---|---|
--check |
Diff the synthesised binding against the file on disk; exit 1 if they differ. |
just-makeit status¶
Show which files in the project tree have drifted from what jm apply would
generate — a read-only drift report. Must be run from the project root.
| Flag | Description |
|---|---|
--allow PATH |
Treat PATH (exact path or fnmatch glob) as a known deviation: reported as ALLOWED, not counted. Repeatable; combines with [project] status_allow in the manifest. It cannot exempt the findings marked yes, always below. |
--json |
Emit the report as JSON ({path, state, allowed, dropped_symbols} per entry) instead of a table. |
--diff |
Print a unified diff per stale file, and the root CMakeLists.txt against today's render when ROOT CMAKE names a fix it lacks. |
--check |
CI mode: every counted finding still prints, MISSING and STALE with their files (gh-1619), while the UNRECONCILED, ALLOWED, STALE ALLOW and NOTE listings collapse. Exits 1 on drift, and on any file it could not compare. |
--shared-cores |
List component cores statically linked into more than one extension module (gh-1117). CPython imports extensions RTLD_LOCAL, so each .so holds its own copy of every file-scope static in those cores — correct for a pure kernel, silently wrong for a primitive whose contract is one-per-process. Opt-in and never counted, both measured: over doppler's manifest it lists 45 cores across 33 modules, almost all of them correctly, so printing it by default would be noise and counting it would fail a green project forever. Always present in --json, where a machine reader can filter to the core it cares about. jm reports the linkage it owns and does not read your C to guess which core is which. Declaring the one that matters: Shared process state. |
--strict-examples |
Promote "an authored @code line is too wide for its generated stub" from a reported count to a failure (gh-760). This is the one-off form; [project] strict_examples = "true" in the manifest is the durable one, so a project that wants the stricter reading does not have to remember the flag at every call site. |
--docs |
List every property, record field, method and module function whose docstring is only its name, and where each would read its text from (gh-1394). Read-only, and it exits 0 whatever it finds: whether an undocumented member deserves a sentence is the author's call, and a gate here would fail a project on the day it declares a property it has not documented yet. A field's text comes from its OWN struct's trailing /**< ... */ (gh-1300) — a same-named field in another struct, or in a header yours includes, is not consulted, so this report is how you find the ones nothing documents. Class and module docs are not walked yet (gh-1396). |
Prints a table of files, each in one of these states:
In the last column, yes is a finding --check fails on unless
--allow or [project] status_allow names it, yes, always is one
nothing can exempt, and no is advisory. The report says the same under
each section that states it, and each is read from one table in jm.
| Status | Meaning | Gates CI? |
|---|---|---|
OK |
apply would leave the file untouched. |
no |
MISSING |
apply would create it — declared in the manifest, absent on disk. |
yes |
STALE |
apply would rewrite it from the manifest (glue regenerated, _core.h declarations merged) or, for a sacred _core.c, append a definition the manifest declares and the file lacks (gh-1294). |
yes |
ALLOWED |
A MISSING/STALE file matched --allow or [project] status_allow — reported, but excluded from the drift count. |
no |
DROPPED |
A stale .pyi whose on-disk class/method/function has no manifest trace and would vanish on regen (gh-426). This is content loss, not routine drift, so it is never suppressed by --allow or status_allow. |
yes, always |
DRIFT |
An init-param default in the manifest disagrees with the default documented in the component's _core.h (gh-442). jm can't tell which side is stale — fix one to match. Also never suppressible. |
yes, always |
VERSION |
A generated file's copy of [project] version disagrees with it (gh-1141) — pyproject.toml, the top CMakeLists.txt's project(... VERSION), bootstrap.toml, the Doxyfile's PROJECT_NUMBER, or <pkg>_version() in native/src/<pkg>_lib.c. All five are create-only, so apply rewrites none of them and a bump reaches none of them. jm can't tell which side is stale — a release bumps pyproject.toml and never the manifest, so it is often the manifest — so it names both and rewrites neither. Suppressible per file with status_allow. Omitting [project] version from just-makeit.toml makes jm read it from pyproject.toml instead, which removes that file from this check entirely (gh-1283) — see configuration. |
yes |
ORPHAN |
A native/inc/<pkg>/<comp>/<comp>_procglobal.h on disk for a component that no longer declares process_global (gh-1142). The same apply that dropped the key stripped the rendezvous from every generated PyInit_, so the header — stamped DO NOT EDIT — now describes one that is not generated and names a publisher that does not publish. It still compiles; what breaks is a hand-written binding that follows it. jm deletes nothing: remove the file, or re-declare the key. |
yes |
DOC |
A manifest doc carries a numpy section heading (Parameters / ----------) (gh-1154, gh-1493). A doc renders verbatim on every face, so the heading lays out correctly -- and jm then appends the section it generates itself, so the docstring has two. Write the prose in doc and let jm generate the sections, or put the full docstring as Doxygen above the declaration in the component's _core.h. Never reported where the doc is the member's whole docstring and jm generates nothing beside it: an extra_methods row, a property, a capsule's methods (gh-2059). Suppressible per entry with status_allow. |
yes |
UNBUILT |
A native/tests/test_*_core.c or native/benchmarks/bench_*_core.c that no build file compiles (gh-806) — usually a renamed component's real suite, left behind while a fresh scaffold took over its target. |
yes |
UNRUN |
A build target that compiles a native/benchmarks/ source but is not bench_<s>_core for a component jm bench runs (gh-2494): built on every build and run by nothing. Exempt one run another way with status_allow = ["<build file>:<target>"]. See Why UNRUN gates. |
yes |
CTOR |
A constructor declaration in the sacred native/inc/<pkg>/<obj>/<obj>_core.h takes different parameters from the ones the manifest renders (gh-1076): the object's <pkg>_<obj>_create() or its create_fn, or any view's create_fn (gh-2552). The report names which. jm injects each of those declarations, so this is jm verifying what it wrote. For the object's own it cannot tell which side is stale — fix one to match. For a view's, whose parameters jm derives from the manifest, the report names the declaration and the _core.c definition to change and prints the prototype to paste (gh-3005). Never suppressible: while they disagree, jm regenerate <obj> emits a create() that does not compile against your _core.c. |
yes, always |
ORDER |
A definition in your C takes the manifest's parameters with the same types in another order (gh-2465): C compiles it, and a caller following the header passes them swapped. jm apply refuses until they agree; never suppressible. See Why ORDER gates. |
yes, always |
UNDEFINED |
A function the manifest declares and the binding calls is defined nowhere jm can read, and the component's core library also compiles sources jm cannot read (gh-2942). apply will not append a body one of them might define -- a second definition is worse -- so the extension does not link until you write it, or put the source that defines it in the component's directory. Never suppressed. |
yes, always |
FAMILY |
A family header's core_macro invocation never closes, or is written more than once (gh-1310, gh-2942). apply keeps exactly one in sync with the manifest and cannot tell which you meant, so it leaves the header alone, and the header does not compile. Never suppressed. |
yes, always |
RENUMBER |
An [[enum]]'s order moved off jm's record of it ([project.applied_enums]) by more than an append (gh-2941). Position is the C int, so every stored value -- in a file, a state, an old peer -- now means another choice. jm apply refuses it: restore the order or append, jm apply --renumber <enum>, or bind the values with enumerators (gh-1450), after which a kept fragment's functions that pass positions are refused too: delete each with its row and apply again. An enum that declares enumerators is never compared. |
yes, always |
GUARD |
A member of a sacred binding fragment lacks a safety guard jm's current render has (gh-2581): the output-size check, a refusal the manifest declares, the count a released call needs before a teardown frees, and the rest the marker table classifies as safety. Named per fragment and member, with each missing guard and what goes wrong without it. Never suppressible. See Why GUARD gates. |
yes, always |
UNCHECKED |
The UNBUILT scan above did not run (gh-1033): a build file enumerates its sources by wildcard, so "is this compiled?" cannot be answered by reading. Reported because the absence of an UNBUILT section otherwise means "not checked" and "checked and clean" indistinguishably. Not a gate — no jm apply clears a wildcard; name your sources explicitly to put the tree back under the gate. |
no |
SILENT |
A generated benchmark that records no measurement: the component has no step() and none of its methods has a benchable shape, so the target writes an empty "benchmarks": [] array (gh-806). The file itself carries a TODO: naming the candidate methods and a worked jm_bench_add example (gh-840) — SILENT is the to-do list; the file is the instructions. Read from source, so it says only what it can see: the jm_bench_t accumulator passed to jm_bench_write_json is declared in the file and touched by nothing else. Hand it to anything — jm_bench_add, or a helper of your own, in the file or a header — and it is not reported (gh-1691); jm bench reports a binary that in fact recorded nothing as silent, from its JSON. |
no |
UNPARSEABLE |
A .pyi on disk that is not valid Python and holds hand-written members (gh-785). jm finds a stub's members with ast, so it can find none in this one and the next jm apply renders over them. Never suppressible. |
yes, always |
NOTE |
A method sets pass_capacity while its header still declares max_out(state) (gh-921), so the exact allocation the opt-in asks for is not the one generated. Nothing is broken — see below — so this is a note, never counted and never printed under --check. |
no |
CHANGED WHILE STATUS RAN |
A file apply would change that was rewritten in the project while status ran, after status read it (gh-2488). Every finding is about one read of the project, so a file written mid-run -- by a test run, a formatter, an editor -- is not compared, and is never reported STALE. A file apply would leave alone is not re-read at all, so a tool cache or a file of yours written meanwhile never appears. Listed in --json as changed_during_run. Re-run jm status once nothing is writing; suppressible with status_allow. |
yes |
OUTDATED |
A create-only file whose content is jm's own — the Makefile, .clang-tidy, .clang-format, .gitignore, .gitattributes, CMakePresets.json, Doxyfile, zensical.toml, bootstrap.toml, jm_test.h, jm_bench.h, jm_perf.h, jm_simd.h, clib_common.h, pyex_common.h — and which differs from what this jm renders (gh-949). The packaging templates are reported under PACKAGING instead. apply never rewrites a create-only file, so adopting the new version is your call; suppressible with status_allow. |
no |
ROOT CMAKE |
A fix jm's root CMakeLists.txt template carries outside its marked blocks and the project's root file lacks (gh-1459, gh-1471): the combined library's libm link (gh-1452), and the Windows build's static library name, DLL exports, default build type, release CRT, complex-range flag and CRT/math defines (gh-1368), venv-check: a configure naming a .venv interpreter that does not exist says to create it instead of failing as Could NOT find Python3 (gh-2610), and install-block: the install section is not jm's managed block, so no packaging fix reaches it (gh-1589; jm adopt --packaging). Outside those blocks the file is yours, so apply never adds them; each line says what breaks without the fix and where, and --diff prints the file against today's render to merge from. Read as CMake commands rather than text, so a formatter's layout or your own equivalent spelling is not reported. Suppress one fix with CMakeLists.txt:<fix> in status_allow. |
no |
CI PYTHONS |
A CI file whose Pythons jm cannot locate (gh-2629): a .github/workflows/ci.yml with no python-version list or more than one, or a .woodpecker.yml without exactly one image: python:3.N line. apply never rewrites it, so it would never read STALE however far it falls behind the classifiers. A workflow that computes its own matrix is a legitimate one, so it is not counted; listed in --json as ci_pythons_unlocated. Suppressible with status_allow. |
no |
LINE ENDINGS |
A file that differs from jm's render only in CRLF versus LF (gh-1641) -- what a Windows checkout without the project's .gitattributes gives every file. No compiler, CMake, Python or formatter reads the two differently, so it is neither STALE nor OUTDATED; --check prints the count, the full report the files. apply rewrites the files it regenerates as LF and lists them as eol. See Windows. |
no |
UNANCHORED |
The top CMakeLists.txt has lost a sentinel jm splices against — # ── Components or # ── Modules (gh-975). Every splice treats a missing anchor as nothing to do, so the wiring was never written and a module with no add_subdirectory() is not built at all. Put the line back, or keep that wiring yourself and name the file in status_allow. |
yes |
UNWIRED |
A component declares an OBJECT library (in its CMakeLists, or its <dir>_extra.cmake hook) that no CMakeLists.txt folds into a combined C library (gh-984), so its symbols ship in neither lib<pkg>.so nor lib<pkg>.a while its header installs anyway. Python is unaffected — the extension links each core directly — which is why this hides. For a core jm generates, jm apply writes the missing target_sources() line; for any other -- a no_generate module's, a c_dep's, your own -- the listing says jm apply writes no line and prints the lines to add to the root CMakeLists.txt (gh-1626). Which applies is read from the replay status runs: a core that replay still declares and wires (gh-1840). Suppressible per component with CMakeLists.txt:<core>, or wholesale with CMakeLists.txt if you link your cores your own way. |
yes |
DANGLING |
The top CMakeLists.txt wires a <X>_core that no component declares (gh-984) — an interrupted removal or a bad merge. cmake resolves $<TARGET_OBJECTS:> at configure time, so the project does not build at all. jm apply drops the line. Never suppressible. |
yes, always |
KWARGS |
A binding fragment's constructor keywords disagree with the manifest, so the .pyi advertises a signature the compiled object rejects (gh-612, gh-823). jm regenerates a kwlist only with the body it belongs to: reconcile the manifest with the binding, or move the hand-written constructor into an _extra.c. Suppressible per file with status_allow. |
yes |
RECORDS |
A record's fields disagree with the manifest: the .pyi documents a field the extension does not have, so .field raises AttributeError on a name a type checker accepts (gh-1290). Delete the record's wrapper and its row and re-run jm apply, or keep the binding in an _extra.c. Suppressible with status_allow. |
yes |
UNEXPLAINED OPT-OUT |
A [module.X] no_generate with no no_generate_reason, or a reason left on a module that generates again (gh-1313). Never suppressible: the fix is one line of TOML. |
yes, always |
UNRECONCILED |
Files jm apply reconciles in place but not wholesale (gh-848) — a binding fragment holding a hand-written body, say — each listed with why it differs. A fragment listed here can also have a finding under a heading of its own, which is counted as that heading says: a missing safety guard as GUARD, constructor keywords as KWARGS, and likewise RECORDS, PROPERTY STATUS and DIAGNOSTICS. |
no |
STALE ALLOW |
A status_allow entry that matches no managed file. A renamed or deleted component leaves its pattern behind, and it would then silence whatever path later matches it. |
no |
PACKAGING |
A packaging template without the # jm:generated line that is behind today's render (gh-1589). jm adopt --packaging hands it to jm — see adopt --packaging. |
no |
PKG-CONFIG |
A [project] find_packages entry the installed .pc cannot name (gh-1576). Give the entry a pkg_config module, or libs_private and cflags when the dependency ships no .pc. |
no |
BACKINGS |
Under a c_prefix, how each capsule / composer backing spells its C API: through a component's symbols, or exactly as written (gh-1685). Not printed under --check. |
no |
TOKEN WITHOUT KEY |
A binding fragment that says jm regenerates it while its object no longer declares fragment = "generated". Restore the key, or delete the file and re-run jm apply. |
no |
UNLINKED INCLUDE |
A public _core.h includes the header of a dependency that is test_only or no longer declared, in a line jm cannot claim as its own: untagged (written by an earlier jm, or by you), or tagged with a note added (gh-2954). A line tagged exactly is not listed here; apply removes it, so it reads STALE. Also a param header's include that jm tagged /* jm:header <path> */ and no param, view or dependency names any more (gh-2962): remove, apply and status never remove it, since they cannot prove nothing in your C uses the header. Its path is the header field of the JSON row (dependency is null). Delete the line once nothing does. |
no |
EXAMPLE |
A header's @code example calls create() with a different number of arguments than the declaration (gh-1502), or with the parameter names in another order (gh-2465). The example is your text, so jm reports it and rewrites nothing. |
no |
SUPERSEDED |
A file jm has renamed, still on disk under its old name (gh-1472). apply holds the new one back rather than create a default beside it; the listing says what to do. Counted only for a move jm apply makes itself; a rename left to jm upgrade is not drift. |
yes |
NON-ASCII NAMES |
A declared name outside ASCII (gh-784). See below. | no |
BACKEND |
The Makefile is the other build backend's than [project] build names (gh-1899). jm apply replaces it. One mismatch shows under STALE too and drift has one for each. |
yes |
DECLINED |
A Python benchmark on disk for an object that declares no_python_bench (gh-2316). jm deletes nothing: remove the file, or drop the key. |
yes |
PROPERTY STATUS |
A hand-owned property wrapper drops a status the manifest declares, so the documented exception is never raised (gh-2538). | yes |
DIAGNOSTICS |
A constructor raises or warns what the manifest no longer declares (gh-2555). | yes |
WHY |
A method's trailing int *status / const char **why differs between your C and the manifest, so the binding does not compile (gh-2574). |
yes, always |
STRICT EXAMPLES |
An authored @code line too wide for its stub, while strict_examples or --strict-examples is on (gh-760). Printed as a sentence rather than a heading; without the setting it is a count and is not drift. |
yes, always |
RECORD |
jm has not yet recorded where it placed this project's files (gh-2459). The next jm apply records it. |
no |
ADVICE |
A file at a place jm has no record of putting it (gh-2459). | no |
SHARED CORES |
Only with --shared-cores: component cores linked into more than one extension module (gh-1117). |
no |
jm status exits 1 when any yes row above has a finding and 0
otherwise, so jm status --check is a drop-in CI gate. The count itself
is drift in --json, and gating says which headings carry it. A file
is counted once under each heading it shows under, so drift is not a
number of files: one backend mismatch adds to STALE and to BACKEND.
DROPPED is the one row that can name a file drift already has under
another heading (STALE), so the rows need not sum to drift.
NON-ASCII NAMES — an advisory, not drift¶
Alongside the file table, jm status lists every declared name outside
ASCII — object, module, function, method, property, view class, state field
and init param. A name is not a file apply would rewrite, so this is never
counted in the exit code and never appears under --check.
NON-ASCII NAMES (1) — already declared, portability risk:
? method 'café'
GCC accepts UTF-8 identifiers as an extension and MSVC differs, so these can
compile on one toolchain and not another. Rename them to ASCII; jm no longer
accepts one, so `apply` refuses the manifest until you do.
Not drift: `--check` does not fail on it.
It is printed before the report's other sections, and that ordering is
load-bearing: status computes drift by replaying apply on a scratch copy,
and since gh-784 that replay refuses a manifest carrying such a name. Were
the list printed in table order it would never be reached by the one project
that needs it, and renaming would proceed one error: at a time instead of
from a complete list.
Shipped in v0.55.0, a release ahead of the rejection, so a project could
rename on its own schedule. See Naming rules under
jm object.
NOTE — an opt-in that cannot take effect¶
pass_capacity hands the kernel its output capacity so the binding can trust
max_out() exactly, allocating it instead of the defensive max(max_out, n).
That trust needs max_out to be able to see the call, which is the other
half of gh-607: the count parameter. A project can sit between the two — the
manifest opts in, the sacred header still declares the pre-gh-607
max_out(state):
NOTE (1) — `pass_capacity` is set but cannot take effect:
. nco.steps_u32: <pkg>_nco_steps_u32_max_out(state) cannot see the call,
so the allocation stays clamped to max(max_out, n).
Since gh-920 this is safe: a bound that cannot depend on n is not read as
a per-call one, so the clamp stays and nothing truncates. Before that fix it
was not — doppler's NCO.steps_u32(393_216) returned 65536 samples and raised
nothing. What remains is only that the opt-in is inert and says so nowhere, so
status says it. Two ways out, both in the message: give max_out the count,
or declare exact_max_out if the bound really is call-independent.
It is a note rather than a gate because it cannot be wrong — the arity is read off the header's own declaration and the flag off the manifest, with nothing inferred between them — and because the allocation it describes is correct. Failing CI over a correct allocation would be worse than the silence.
It lives here rather than on jm apply for the same reason NON-ASCII NAMES
does: the condition is per method, and on a tree with dozens of
variable-output methods an apply-time note is a wall of lines arriving exactly
when the reader is watching for what changed. This is a standing property of
the manifest, not an event.
Why UNBUILT gates¶
Renaming a component moves its manifest section and its native directories,
but its C test and benchmark keep their old filenames. jm apply then
materialises test_<new>_core.c / bench_<new>_core.c and re-renders the
CMake that builds those names — so the author's real files stay on disk,
compiled by nothing, and a scaffold takes over the target.
The scaffold passes. ctest reports "100% tests passed" with the real
suite missing from the denominator, and make bench exits 0 having measured
nothing. Every other finding here shows up as something visibly wrong
somewhere; this one shows up as a green CI run, which is why it is the one
finding whose report had to be a gate rather than a note.
If a file is deliberately kept unbuilt, name it in [project] status_allow:
it stays listed, marked [status_allow], and stops counting.
"A build file" is every CMakeLists.txt in the project (not a build tree or
vendor/), the <dir>_extra.cmake hook each one includes, and the root
Makefile / local.mk. So a hand-written test or benchmark wired in the
hook jm tells you to use
counts as built (gh-1432); before, it was reported UNBUILT while it compiled.
UNBUILT reports a benchmark orphan only when the tree builds some
benchmark. A project that builds none — one predating the make backend's
bench: target (gh-832) — has the whole category unbuilt by construction, and
failing the gate for something no jm apply can clear is the thing this
deliberately does not do. It arms itself the moment the project gains bench
rules.
Why UNRUN gates¶
jm bench runs exactly one target per benchmark it knows of:
bench_<s>_core. A target over a benchmark source under any other name is
built on every build and run by nothing, and UNBUILT cannot see it, because
its source is compiled (gh-2494). doppler lost all ten rows of a
bench_correlator_1d wired in a hand-owned *_extra.cmake that way, with
make bench and jm status --check both green.
So UNRUN lists every add_executable in the same build files UNBUILT
reads whose name starts with bench_, or that names a file under
native/benchmarks/, and that jm bench does not run. The run set is the one
jm bench uses, not a second copy of it. Only the project's own build files
count: one under a hidden directory (.venv, a second checkout) or inside a
nested project with its own just-makeit.toml is not read, since that
project's own jm bench runs its benchmarks. Rename the target onto
bench_<s>_core over a bench_<s>_core.c source and jm bench picks it up.
A benchmark run some other way on purpose is exempted by naming the target,
not the file: <build file>:<target> in [project] status_allow, for example
native/src/stream/CMakeLists.txt:bench_stream. Allowing the whole build file
would also silence every benchmark added to it later. Like UNBUILT, the scan
stands down on a build file that globs its sources, and says so as
UNCHECKED.
Why CTOR gates, and why it reads the header rather than the _core.c¶
Every file jm owns renders from the same init_params, so they agree with each
other by construction — the stub, the binding and the aggregator cannot
disagree about a constructor, because one list produces all three. The only
file that can disagree is the hand-written one, and _core.c is sacred: jm
never writes it.
So jm status --check could report OK — up to date over a manifest declaring
one float[] parameter and a C constructor taking (size_t num_taps, const float *h). doppler carried exactly that, and it was found by reviewing an
unrelated jm change rather than by any gate.
The gap was not uniform, which is why it survived. Reordering a
hand-written create()'s parameters on a standalone object is caught — its
_core.h is a manifest-owned file, so the whole-file diff reports STALE. The
same file with the same edit on a module object reported OK. One edit,
caught in one layout and invisible in the other.
CTOR compares one thing — each injected constructor declaration (the
object's create() or create_fn, and every view's create_fn) against the
parameter list the manifest renders for it — so it answers the same way in both
layouts and does not depend on the whole-file diff.
It reads _core.h, not _core.c. A definition whose parameter types or
count disagree with its own header will not compile, so checking the header
puts that much of the definition under the compiler's gate for free. The same
types in a different order do compile, and that one case is
ORDER's.
It is never suppressible, on the same rule as the gh-442 DRIFT beside it: jm
cannot know whether you meant to change the C or forgot to change the manifest,
and while the two disagree the project cannot be regenerated. There is no
reading of status_allow under which that is intended.
Why ORDER gates, and reads your definitions¶
Swap two double entries in [[<object>.state]] and jm apply used to
rewrite the create() prototype in _core.h while the definition in
_core.c kept the old order. With the same types, C compiles that without a
warning, and every caller following the header passes the two values swapped
(gh-2465). Nothing else would ever report it.
So ORDER compares every declaration jm renders from the manifest (a
create() from state or init_params, a method's params, a module
function, an inline one) against the definition in your C, and reports a
definition whose parameters have the same types in another order. Both orders
are printed, with the definition's file:line. jm apply refuses the same
finding before it writes anything, so the header never moves away from the
definition.
jm never edits the definition: it is yours, and only you know which side is
right. Reorder its parameters (and every call site), or restore the manifest's
order. A difference in types or count is not ORDER's: the compiler reports
that. A renamed parameter is not either, since it still binds by position.
ORDER is never suppressible, for the reason CTOR gives above.
The header's @code example is your text too. An example that passes the
parameter names in another order is reported as an advisory EXAMPLE, never
counted.
Why GUARD gates, and only for a guard¶
A module object's binding fragment (<mod>_ext_<obj>.c) is sacred: apply
adds a member it lacks and never rewrites one it has. So a guard jm adds to
a wrapper after the fragment was rendered never arrives, and the fragment
keeps working until the input the guard exists for. doppler carried two
capture fragments without the output-size checks for several releases: an
oversized result wrapped to a negative dimension, and a kernel returning
more than its buffer was shaped past the allocation. apply said so in a
warning, and jm status --check stayed green (gh-2581).
apply reads each member's body for markers -- the constructs jm's render
puts there for a feature or a guard -- and names the ones the fragment
lacks. Each marker is classified once, in the table both apply and
status read (_docsync.MARKERS). It is safety when a fragment
without it lets a call touch freed or out-of-range memory, or return a
wrong answer with no exception: the output-size and returned-count checks,
a refusal the manifest declares (error_sentinel, error_negative,
status_return, a status_errors row, strict), the out= contiguity test, the
integer range test, the inflight count and teardown wait of a call that
releases the GIL (gh-2272), a retained or required capsule, a borrow
release's record, a deferred free, the byte-array converter and a
str_hint, and a records method's capacity and consumed-input loop.
Every other marker is advisory and stays an UNRECONCILED reason: a
calling convention, a result's Python shape and nogil itself (holding
the GIL is slower, never unsafe). The stub and the binding disagree there,
but the call does the right thing or fails loudly.
apply marks the warning ! when it names a guard, and GUARD counts
one finding per member, with jm's form of each missing guard (in
--json, forms).
A finding clears when the member carries that form. There are two ways:
- Re-render the fragment.
jm adopt --checksays whether jm can take it over (jm adopt <obj>, so every later fix arrives too), or delete it and re-runjm apply. - Write the guard by hand in jm's form. A body you wrote yourself
keeps its code.
jm status --diffshows jm's render.
The markers read jm's own spelling. A guard written another way -- an if (rc == DP_EIO) in place of a case DP_EIO: arm, a range test on a local
not named <p>_raw -- is not recognised yet (gh-2589). Never suppressible:
a missing guard is not a choice a project makes.
A teardown's inflight wait is asked of a fragment only when some member of that fragment releases the GIL. A fragment rendered before gh-2259 holds it everywhere, so its teardown has nothing to wait for.
Why a stand-down is UNCHECKED and not silence¶
The scan reads build files as text, and one shape defeats that outright: a
file(GLOB ...) compiles whatever matches, so no amount of reading answers
"is this source built?". jm stands down rather than guess, because a wrong
"unbuilt" sends someone to delete a file that is compiled.
Standing down used to look exactly like finding nothing — an empty listing and
an OK line (gh-1033). That is the gh-806 failure one layer out: a check whose
whole purpose is to break a silence, reporting a tree it never read as clean.
So the stand-down is now printed as UNCHECKED, the OK line carries
unbuilt not checked, and --json carries "unbuilt_scanned": false.
It does not gate. There is no command that clears it — jm apply cannot
rewrite your wildcard — and gh-767's rule is that a gate must name a fix. What
puts the tree back under the gate is naming the sources explicitly in the build
file.
jm bench's discovery makes the same stand-down and has printed the same kind
of note since gh-1023; the two now agree.
Why UNPARSEABLE gates, and why only status can catch it¶
Every other finding on this page describes something jm apply fixes. This
one describes something jm apply consumes.
jm preserves a stub's hand-owned members — manual_stub methods and any
member marked # jm:hand — by parsing the old file with ast and
transplanting the text back over the fresh render. A stub that does not parse
has no members to find, so the render replaces all of them. Then the file jm
writes does parse, the finding disappears, and the next jm status is
clean over a tree that has lost members no manifest can put back — a
# jm:hand member has no manifest declaration at all.
So status is the last moment anything can say so while the content is still
on disk:
UNPARSEABLE (1) — .pyi file(s) that do not parse, holding 2 hand-written member(s):
! src/sp/thing.pyi: line 64: invalid syntax
- execute_ci16
- execute_special
Fix the syntax error first and every one of them survives. Run jm apply
first and they are gone; jm apply says so as it happens, but by then the
only copy is in version control.
jm warns rather than refusing here, unlike the sibling check that guards a
parseable stub (gh-765, which raises). A stub that is not valid Python is
itself broken, and regenerating it is the natural repair — refusing would
block the recovery path for exactly the situation that produces it. A broken
stub with nothing hand-owned in it is therefore repaired silently, as routine
STALE drift.
Two runtime signals back this up in newly scaffolded components, so a CI log
tells a placeholder from a suite without anyone running jm status:
- a generated C test prints its assertion count —
PASSED (4 checks)— plus ano assertions beyond the N just-makeit generatednote that clears itself the moment an author adds a check of their own. Both the counters and that note live innative/tests/jm_test.h, written once per project (gh-934); jm_bench_write_jsonprintsno measurements recordedwhen a benchmark timed nothing.
Both live in create-only files, so they reach components scaffolded from
v0.52.0 onward. Existing trees are covered by the UNBUILT / SILENT scan,
which needs nothing but the files already on disk.
status never writes anything (it runs apply against a throwaway copy of
the tree); it is always safe to run. Use it to confirm that jm apply is a
no-op before a release, or to see what changed after a manual edit to
just-makeit.toml.
just-makeit adopt¶
Make a module object's binding fragment (<mod>_ext_<obj>.c) jm's content,
so every future binding fix reaches it on apply. Writes
fragment = "generated" only where nothing of yours would be lost. Why and
when: Who owns a module's binding fragment.
just-makeit adopt --check # what each object would do; writes nothing
just-makeit adopt fir # flip one object (and its views)
just-makeit adopt --module dsp # every object in a module
just-makeit adopt fir --accept-additions # also take units the render only adds to
| Flag | Description |
|---|---|
--check |
Report per object — would flip, needs acknowledgement, REFUSES — and write nothing. Exits non-zero when anything cannot flip unattended. |
<obj>… / --module ID / --all |
The objects to flip. There is no default: without one, adopt writes nothing. |
--accept UNIT |
Take one differing unit (fn:Fir_init, table:PyMethodDef, as --check prints them) by name. Repeatable. A name that matches no differing unit is refused as a typo. |
--accept-additions |
Take every unit --check labels adds only: the render keeps every token of it and adds code, so nothing on disk is lost. |
An object flips only when nothing refuses it and every differing unit is
accepted; otherwise nothing is written for it. A unit that exists only on
disk always refuses — move it to the _extra.c beside the fragment.
just-makeit adopt --packaging¶
Make the packaging files jm's, so apply renders them and every pkg-config
and find_package fix reaches the project (gh-1589): the templates
cmake/<pkg>.pc.in and cmake/<pkg>-config.cmake.in, and the root
CMakeLists.txt's install section. A project scaffolded since gh-1589 has
them born owned -- each template's first line is # jm:generated <file>, and
the install section is the managed block from # ── Install to
# ── End install. An older one has neither: jm status names each template
that is behind under PACKAGING, and the section as
ROOT CMAKE install-block.
just-makeit adopt --packaging --check # diffs, and what would be dropped; writes nothing
just-makeit adopt --packaging # take every template that loses nothing
just-makeit adopt --packaging --accept my_proj-config.cmake.in # take one anyway
| Flag | Description |
|---|---|
--packaging |
Act on the packaging templates. Takes no objects, --module, --all or --accept-additions. |
--check |
Print each template's verdict, its diff against today's render, and every line adopting would drop. Writes nothing; exits non-zero when a template is refused. |
--accept PATH |
Take a refused template (by path cmake/p.pc.in or file name) or install section (CMakeLists.txt) anyway. Repeatable. |
A line on disk that the render does not keep refuses its template. An older
jm's line that today's render only extends (Cflags: -I${includedir} →
Cflags: -I${includedir}@JM_PC_CFLAGS@) is kept; one jm has since respelled
cannot be told from a line you wrote, so it is listed and --accept takes it
after you have read the diff. To keep something of yours, set it as a CMake
variable in the root CMakeLists.txt that the template reads. Deleting the
# jm:generated line afterwards hands a template back to you for good.
The install section is judged by COMMAND, the same way: adopting replaces it,
from the # ── Install line to the end of the file, with the managed block,
and refuses when that would drop a command no released jm rendered there --
doppler's include(cmake/packaging.cmake), say. Move such a command above
the # ── Install line and adopt; afterwards your own install rules go below
# ── End install, which jm never writes. Inside the block, apply compares
commands, not bytes, so your formatter's layout is never rewritten.
just-makeit script¶
Print a shell script to stdout that fully reconstructs the current project from scratch via CLI commands. Must be run from the project root.
Reads just-makeit.toml and emits one command per scaffold step in the
correct category order: new → module → object → record → method →
property → view → warning → error → function, plus
config version when the version is not 0.1.0. A key with no CLI spelling
is listed as a # NOTE: comment saying where to re-add it. A table with no
verb at all -- [[enum]], and a kind = "handle", "capsule" or
"composer" module with every sub-table it holds -- is re-declared whole, as
a cat >> just-makeit.toml block, and a script holding a kind module ends
with just-makeit apply to write its binding (gh-2711). The output is a
valid shell script that, when run from the parent directory, produces an
identical just-makeit.toml. Within the object category, order matches
original creation order for a --no-fragments (single-manifest) project;
under the default fragment layout, objects are read back from
objects/*.toml and so are reconstructed in filename (alphabetical) order
instead — harmless for correctness (each object command is independent) but
the sequence may not match how you originally typed it.
Note: lifted --impl bodies are not reproduced. The create:: and
reset:: slots of jm object record their bodies in just-makeit.toml as
create_impl (gh-2959) and reset_impl (gh-2991), but script does not yet
replay them (gh-2998). The other --impl forms are not stored: the body is
patched directly into the generated files. Implemented function and step
bodies are preserved in your C source files and are unaffected.
Example
Given a project with two objects (abridged; jm new gives every project a
c_prefix, and the default layout keeps each object in its own fragment):
# just-makeit.toml
include = ["objects/*.toml", "modules/*.toml"]
[project]
name = "dsp_toolkit"
version = "0.1.0"
build = "cmake"
c_prefix = "dsp_toolkit"
# objects/gain.toml
[gain]
arg_type = "float"
return_type = "float"
[[gain.state]]
name = "gain"
type = "float"
default = "1.0"
# objects/ema.toml
[ema]
arg_type = "float"
return_type = "float"
[[ema.state]]
name = "alpha"
type = "double"
default = "0.1"
[[ema.state]]
name = "prev"
type = "float"
default = "0.0"
just-makeit script produces:
#!/usr/bin/env sh
# Reconstructed from just-makeit.toml
just-makeit new dsp_toolkit \
--c-prefix dsp_toolkit
cd dsp_toolkit
just-makeit object ema \
--state alpha:double:0.1 \
--state prev:float:0.0 \
--arg-type float
just-makeit object gain \
--state gain:float:1.0 \
--arg-type float
Running that script from the parent directory recreates the project structure
and an identical just-makeit.toml.
just-makeit migrate-to-fragments¶
Move every [<obj>] section of just-makeit.toml into objects/<obj>.toml
and every [module.X] into modules/<name>.toml (a dotted id by its C name,
dsp.filters into modules/dsp_filters.toml, as jm module names it),
leaving the manifest with [project] and the include globs — the layout
jm new gives a project today. The merged manifest is unchanged, and running it again is a no-op. Must
be run from the project root.
Fragments load sorted by file name, so the order the manifest lists
components in can change. The root CMakeLists.txt wiring and the umbrella
header's includes are re-sorted to match — the order jm apply writes — and
nothing in them is added or removed.
Every comment survives. A moved table takes its comments to its fragment: the ones inside it, and the comment lines directly above its header (no blank line between). A comment a blank line separates from the next header stays with the table above it. The manifest keeps everything else as you wrote it.
A script of your own that parsed just-makeit.toml with tomllib read
every table from that one file; after the move it finds none of them. The
command ends with a note saying so: switch such a script to
just-makeit manifest --json or
just_makeit.load_manifest.
See Migrating an existing project.
just-makeit manifest --json¶
Print the merged manifest as JSON on stdout: just-makeit.toml plus every
fragment its include names, with templates and init_groups expanded --
the manifest jm apply renders. Read-only. This is the stable way for a
project's own tooling to read the manifest; parsing just-makeit.toml
alone misses every table that lives in objects/*.toml or
modules/*.toml.
From Python, the same dict, with no subprocess:
from just_makeit import load_manifest
cfg = load_manifest(".") # the project root
for name, mod in cfg.get("module", {}).items():
print(name, mod.get("objects", []))
load_manifest raises FileNotFoundError when the directory has no
just-makeit.toml, and just_makeit.Refusal (a ValueError) for a
manifest jm refuses; the CLI exits 1. The result is yours to change;
nothing is written back. A key starting with _ (_template, _group,
...) is a marker jm adds while loading, not part of the schema. --json
is the only format, and it is required.
A refusal's .errors holds every problem it found, one string each:
import just_makeit
try:
cfg = just_makeit.load_manifest(".")
except just_makeit.Refusal as exc:
for problem in exc.errors:
print(problem)
just_makeit.components(cfg) lists the manifest's components: every
object, standalone or in a module, including one no module lists. Use it
rather than collecting the [module.X] objects lists, which miss the
standalone ones, or skipping the reserved sections by hand, which goes
stale the day jm adds one:
from just_makeit import components, load_manifest
for name in components(load_manifest(".")):
print(name)
just_makeit.is_versioned(path, root) says whether
jm status compares path (project-relative,
/-separated) against jm's current render, so that a difference is
reported OUTDATED. A gate on jm status --check passes on an empty
OUTDATED list, which reads the same whether every compared file is
current or jm has stopped comparing one; asking per committed file proves
jm still compares it. Name the files rather than globbing for them: a glob
that matches nothing asserts nothing. A root with no just-makeit.toml
raises FileNotFoundError, so the wrong working directory fails too:
from pathlib import Path
from just_makeit import is_versioned
for header in ("native/tests/jm_test.h", "native/benchmarks/jm_bench.h"):
assert Path(header).is_file(), header
assert is_versioned(header, "."), header
just-makeit split-objects¶
The objects-only subset of migrate-to-fragments: each [<obj>] section
moves to objects/<obj>.toml and every [module.X] stays inline. Prefer
migrate-to-fragments unless you want the modules to stay put. It re-sorts
the root CMakeLists.txt wiring and the umbrella header the same way, and
keeps every comment the same way. It ends with the same note about scripts that parse
just-makeit.toml directly.
just-makeit upgrade¶
Migrate an older project's just-makeit.toml to the current schema and apply
the repairs that go with it. See Upgrading an existing
project.
just-makeit example [name]¶
Run a bundled example end to end — scaffold, implement, build, test — in a temporary directory, printing its output as it goes. Omit the name to list the examples. See Examples.
just-makeit install-deps [path]¶
Install the build dependencies: cmake, a C compiler, pkg-config and, on Linux,
patchelf through the system package manager when one of them is missing, then
numpy and just-makeit into a Python venv at path. Without one, the venv is
the project's .venv when run in a project's root (a directory holding
pyproject.toml or just-makeit.toml), and a per-user venv that survives a
reboot anywhere else; --help names it. It prints the
source <path>/bin/activate line to run. See Get it.
just-makeit install-deps # the default venv, as above
just-makeit install-deps ~/my-venv # venv elsewhere
just-makeit install-deps --check # report what is missing; install nothing
| Flag | Description |
|---|---|
--check |
Report what is installed and missing; exit 1 if anything is missing. |
-h, --help |
Show the full reference: what it installs, the environment it reads. |
just-makeit version¶
Print just-makeit's version. just-makeit --version and just-makeit -V are
the same; just-makeit help (or --help) prints the command reference.