You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: migrate dev environment from Nix flake to mise
Replace the Nix flake devShell with mise (mise.toml) for tool provisioning and
treefmt (treefmt.toml) for formatting. Delete flake.nix, flake.lock, the
Makefile, .envrc, and the devcontainer Dockerfile; CI, the format hook, the
devcontainer, and the docs now drive everything through mise tasks
(`mise run <task>` / `mise tasks`).
Key details:
- Tests run under LuaJIT with busted 2.2.0: the blocking-diff tools yield
coroutines across pcall/C boundaries (which PUC Lua 5.1 forbids), and busted
2.3.0 changed test-execution behavior the suite depends on. PUC `lua` is kept
only to provide LuaRocks, which builds the rocks targeting LuaJIT.
- mise.lock pins resolved tool URLs/checksums (the integrity role flake.lock
played); `mise run setup` builds busted/luacheck/luacov into ./.luarocks.
- treefmt.toml replicates the former treefmt-nix formatter set (nixpkgs-fmt
dropped since no .nix files remain).
- Devcontainer regenerated via `mise generate devcontainer`.
Change-Id: If27a12690d9d608e71dd534759eeecd6d8fd4cd2
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Thomas Kosiewski <tk@coder.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,13 @@
10
10
11
11
## Build, Test, and Development Commands
12
12
13
-
-`make check`: Syntax checks + `luacheck` on `lua/` and `tests/`.
14
-
-`make format`: Format with StyLua (via Nix `nix fmt` in this repo).
15
-
-`make test`: Run Busted tests with coverage (outputs `luacov.stats.out`).
16
-
-`make clean`: Remove coverage artifacts.
13
+
- Setup (one time): install [mise](https://mise.jdx.dev), then `mise install && mise run setup` to provision the toolchain and build the Lua test rocks. Activate mise in your shell (`eval "$(mise activate bash)"` in your rc) so bare tools like `busted`/`nvim` are on PATH; otherwise prefix with `mise exec --`. Run `mise tasks` to list all tasks.
14
+
-`mise run check`: Syntax checks + `luacheck` on `lua/` and `tests/`.
15
+
-`mise run format`: Format the tree with treefmt (replaces the former `nix fmt`).
16
+
-`mise run test`: Run Busted tests with coverage (outputs `luacov.stats.out`).
17
+
-`mise run clean`: Remove coverage artifacts.
17
18
Examples:
18
-
- Run all tests: `make test`
19
+
- Run all tests: `mise run test`
19
20
- Run one file: `busted -v tests/unit/terminal_spec.lua`
20
21
21
22
## Coding Style & Naming Conventions
@@ -32,13 +33,13 @@
32
33
- File naming: `*_spec.lua` or `*_test.lua` under `tests/unit` or `tests/integration`.
33
34
- Mocks/helpers: place in `tests/mocks` and `tests/helpers`; prefer pure‑Lua mocks.
34
35
- Coverage: keep high signal; exercise server, tools, diff, and terminal paths.
- Quick tip: prefer `mise run test` (it sets `LUA_PATH` and coverage flags).
36
37
37
38
## Commit & Pull Request Guidelines
38
39
39
40
- Commits: Use Conventional Commits (e.g., `feat:`, `fix:`, `docs:`, `test:`, `chore:`). Keep messages imperative and scoped.
40
41
- PRs: include a clear description, linked issues, repro steps, and tests. Update docs (`README.md`, `ARCHITECTURE.md`, or `DEVELOPMENT.md`) when behavior changes.
41
-
- Pre-flight: run `make format`, `make check`, and `make test`. Attach screenshots or terminal recordings for UX-visible changes (diff flows, terminal behavior).
42
+
- Pre-flight: run `mise run all` (format, lint, test). Attach screenshots or terminal recordings for UX-visible changes (diff flows, terminal behavior).
0 commit comments