refactor(cli)!: split the contributor tool out of the ludic CLI
`ludic help` ended with a section titled "contributing to the toolchain itself", listing bootstrap, reseed, docs-gen and release tasks. None of that is available to someone who installed the language — those tasks need the repository — so the shipped tool was advertising work its user cannot do, in a namespace they have to read past to find `new` and `run`. The tasks move to a second program, dev.ludic -> bin/ludic-dev, built from a checkout and excluded from every release artifact. `ludic` keeps the project and package commands and nothing else; `ludic dev …` now explains where the tasks went instead of failing as an unknown command. What this shook out: the two programs share prelude/build/project/pkg, so the helpers each had accreted in whichever file first needed them — cc(), ensure_ludicc, the string functions, title_case, cmd_version — moved to where both can see them. The argument-shift indirection added for the `dev` namespace is gone with the namespace, so commands read argv directly again. `ludic-dev test` asserts the split rather than trusting it: the staged install must build a project, and `ludic dev build` there must fail while naming ludic-dev. install.sh keeps building older tags, whose bootstrap goes through main.ludic. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
f369fbd227
commit
e175619543
46 changed files with 630 additions and 558 deletions
|
|
@ -31,11 +31,11 @@ it needs no path configuration.
|
|||
From a checkout, build them with:
|
||||
|
||||
```bash
|
||||
bin/ludic dev tools
|
||||
bin/ludic-dev tools
|
||||
```
|
||||
|
||||
Produces `bin/ludic-fmt` and `bin/ludic-lsp`. Add `--install` to symlink both
|
||||
into `~/.local/bin`, `--test` to run `bin/ludic dev test-tools` afterwards.
|
||||
into `~/.local/bin`, `--test` to run `bin/ludic-dev test-tools` afterwards.
|
||||
|
||||
## What you get, in any editor
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ ln -sf ../../tools/git-hooks/pre-commit .git/hooks/pre-commit
|
|||
|
||||
The hook runs `ludic-fmt --check` over the staged `.ludic` and `.md` files only,
|
||||
and does nothing at all when `bin/ludic-fmt` has not been built — so it never
|
||||
blocks a commit on a machine that has not run `bin/ludic dev tools`.
|
||||
blocks a commit on a machine that has not run `bin/ludic-dev tools`.
|
||||
|
||||
## Why the formatter is not `ludicc --fmt`
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ both spellings are what the language documents and uses:
|
|||
(`const R_DIR: int = 0 # 0 up`) survive a save;
|
||||
- `id=Root` inside a `ui` block and `{Enemy}` inside a query stay tight.
|
||||
|
||||
`bin/ludic dev test-tools` checks the property that matters: formatting every file in
|
||||
`bin/ludic-dev test-tools` checks the property that matters: formatting every file in
|
||||
the tree and re-running the *compiler's* canonical dump produces byte-identical
|
||||
output. The formatter cannot change what a program means.
|
||||
|
||||
|
|
@ -149,8 +149,8 @@ output. The formatter cannot change what a program means.
|
|||
The vocabulary is written down in five places that cannot include each other —
|
||||
the compiler's two tables, `ludic_syntax.h`, the TextMate grammar (JSON), and the
|
||||
JetBrains lexer (Kotlin). Adding a builtin and forgetting the rest is silent
|
||||
failure, so `bin/ludic dev check-vocabulary` (written in Ludic) compares all five, and
|
||||
`bin/ludic dev test-tools` runs it.
|
||||
failure, so `bin/ludic-dev check-vocabulary` (written in Ludic) compares all five, and
|
||||
`bin/ludic-dev test-tools` runs it.
|
||||
|
||||
When you add a keyword or builtin: put it in `ludic_syntax.h`, then run
|
||||
`bin/ludic dev test-tools` and let it tell you which copies still need it.
|
||||
`bin/ludic-dev test-tools` and let it tell you which copies still need it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue