Skip to content

chore: migrate dev environment from Nix flake to mise#251

Merged
ThomasK33 merged 1 commit into
mainfrom
chore/migrate-to-mise
Jun 2, 2026
Merged

chore: migrate dev environment from Nix flake to mise#251
ThomasK33 merged 1 commit into
mainfrom
chore/migrate-to-mise

Conversation

@ThomasK33
Copy link
Copy Markdown
Member

Summary

Migrates the development environment from the Nix flake devShell to mise (mise.toml) for tool provisioning and treefmt (treefmt.toml) for formatting.

  • Removed: flake.nix, flake.lock, Makefile, .envrc, .devcontainer/Dockerfile
  • Added: mise.toml, mise.lock, treefmt.toml
  • Updated: CI workflow, format hook, devcontainer, and docs now drive everything through mise tasks (mise run <task> / mise tasks)

Key decisions

  • Tests run under LuaJIT with busted 2.2.0. The blocking-diff tools yield coroutines across pcall/C-call boundaries, which PUC Lua 5.1 forbids (attempt to yield across metamethod/C-call boundary); busted 2.3.0 also changed test-execution behavior the suite depends on. This matches what the old luajitPackages.busted provided. PUC lua is kept only to provide LuaRocks, which builds the rocks targeting LuaJIT (luarocks --lua-dir "$(mise where luajit)" --lua-version 5.1 …).
  • mise.lock pins resolved tool URLs/checksums — the integrity role flake.lock played. mise run setup builds busted/luacheck/luacov into ./.luarocks (gitignored).
  • treefmt.toml replicates the former treefmt-nix formatter set (stylua, prettier, shfmt, shellcheck, actionlint, zizmor); nixpkgs-fmt was dropped since no .nix files remain.
  • Devcontainer regenerated via mise generate devcontainer (mise feature + a postCreate that installs build deps and runs mise install && mise run setup).
  • reviewfixer is scoped to a mise run reviewfix task so normal mise install/CI don't fetch the beta binary.

Verification

Locally (macOS): mise install, mise run setup (clean rebuild), mise run check (0/0), mise run test (430/0/0 — parity with the old CI), mise run format-check (clean), and an integration test under mise's Neovim all pass. CI exercises the Linux path.

🤖 Generated with Claude Code

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>
@ThomasK33 ThomasK33 merged commit 781f3ab into main Jun 2, 2026
2 checks passed
@ThomasK33 ThomasK33 deleted the chore/migrate-to-mise branch June 2, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant