DX: replace Python/JS tooling with Ludic (docgen, checks, LSP/web drivers) #31
Labels
No labels
area:ci
area:docs
area:input
area:net
area:rendering
area:repo
area:stdlib
area:tooling
area:types
cleanup
dx
priority:high
priority:low
priority:medium
proposal
status:in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: workshopsoft/ludic#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
tools/is inconsistent with the project's core identity ("no C, nointerpreter — everything from the compiler to the editor toolchain is written in
Ludic"), yet it leans on 8 Python scripts and JS:
tools/check-docs.pytools/check-vocabulary.pytools/test-lsp.pytools/docgen/gen.py,check.py,check-impl.py,validate.py,palette.pytools/test-grammar.js,tools/ludic-web/run.mjsThis means contributors need a Python (and Node) toolchain to run doc/lint/test
utilities for a language that otherwise builds C-free and self-hosted. It's a
credibility and DX gap, and it splits the "how we build things" story.
Proposal
Port the Python/JS tooling to Ludic where feasible, using the same task-runner
(
bin/x) integration the rest of the tooling already has:check-vocabulary/check-docs/ grammar checks → Ludic, wired intobin/x.docgen(the per-symbol → site generator) → Ludic (largest effort; may bestaged). The CI docs workflow currently shells to
python3 tools/docgen/gen.py,so this also simplifies
.forgejo/workflows/docs.yml(nopython:3.12container needed).
test-lsp.py/run.mjs— evaluate whether the Ludic LSP/web drivers can drivethese directly.
minimal.
Acceptance criteria
bin/xwith no Python required.docgenported (or a tracked plan for the remaining piece).Part of the repository-cleanup / DX pass. Relates to the CI/CD issue.
Closing — the doc/lint/grammar tooling now runs through
xwith no Python, and the remaining docgen piece is tracked. Landed ine65e862.What shipped (all verified against the former Python for exact verdict parity — on the clean tree and on injected drift):
x)tools/check-docs.pyx check-docs— every ```ludic doc fence parsestools/docgen/check-impl.pyx check-impl— every implemented feature has a docs pagetools/check-vocabulary.pyx check-vocabulary— vocabulary in sync across grammar/lexer/header/parserpython3 -c json.load/xml.dom.minidominx test-toolsx lint-asset— Ludic JSON + XML validatorstools/docgen/validate.pyx check-docsNew Ludic fragments:
tools/x/json.ludic(a small JSON reader — objects/arrays/strings with\uXXXX+surrogates/numbers/literals) andtools/x/checks.ludic(the checks + string helpers + a minimal XML well-formedness validator).x test-toolsandci.yml's docs-coverage step call these instead ofpython3; the four superseded scripts are deleted (history preserves them).Acceptance criteria:
bin/xwith no Python — the three checks + asset validation are Ludic, wired intox test-toolsand CI. Verified:x test-tools(29) andx test(56) green; each check reproduces its Python verdict and catches the same injected drift.gen.py/check.py/palette.py) is tracked in #41 with a concrete plan (reuse the newjson.ludic, parse → symbol-model → fill the existing asset templates → emit, gated by an oracle-diff againstgen.py). It generates 465 files with Python-json.dumpsformatting straight to the live pages branch, so it wants its own change with a diff gate rather than a rushed reimplementation — the staging this criterion explicitly allowed.ci.yml(check-impl,check-vocabulary) are now Python-free viax; the docs site build (gen.py, thepython:3.12container indocs.yml) is the remaining dependency, removed when #41 lands (this criterion "follows from the port", now tracked).Two latent issues surfaced along the way and filed as background tasks: a
new Type { partial fields }parse-gate drift in two doc fences (whyx check-docsisn't yet a hard CI gate), and thepalette.pyptr/pointergenerator drift (folded into #41).