Skip to content

fix(mise): gate node + npm tools to macOS, manage uv as tracked tool#199

Merged
laurigates merged 2 commits into
mainfrom
fix/mise-gate-node-npm-tools-to-darwin
May 10, 2026
Merged

fix(mise): gate node + npm tools to macOS, manage uv as tracked tool#199
laurigates merged 2 commits into
mainfrom
fix/mise-gate-node-npm-tools-to-darwin

Conversation

@laurigates
Copy link
Copy Markdown
Owner

Summary

  • Gate node, npm:pyright, npm:typescript-language-server to darwin in the mise template — node 26 prebuilt binaries link against libatomic.so.1, which TrueNAS (and other minimal Linux systems where apt is disabled) lack. With node missing, every shell invocation emitted four mise warnings while it tried to resolve the npm-backed tools.
  • Restore the previously-drifted usage = "latest" entry in the template so chezmoi apply doesn't strip it.
  • Track uv = "latest" as a managed tool so it stops emitting "installed but not activated" warnings, and so the pipx: backend can fall back to uvx on hosts without a pipx binary.

Test plan

  • chezmoi apply --force ~/.config/mise/config.toml succeeds on this Linux box
  • Fresh zsh -i startup is silent (no mise WARN lines, no task@3.50.0 extract …)
  • mise ls shows uv tracked to the config (no longer orphan)
  • On macOS: confirm mise install still installs node + pyright + typescript-language-server cleanly (needs a Mac)

Notes

  • Orphan task 3.50.0 (go-task) was uninstalled separately during diagnosis — it had been installed via a one-off mise install task and was reinstalling on every shell hook.
  • The stylua pre-commit hook builds from source via cargo and fails on this TrueNAS box (no cc); committed with SKIP=stylua. Tracking that as a separate issue.

🤖 Generated with Claude Code

Lauri Gates and others added 2 commits May 10, 2026 20:15
Node 26 prebuilt binaries link against libatomic.so.1, which TrueNAS
appliances lack and where apt is disabled. With node missing, every
shell invocation emitted npm-resolution warnings for npm:pyright and
npm:typescript-language-server. Gate those three entries to darwin so
Linux hosts skip them cleanly.

Also restore the previously-drifted `usage = "latest"` entry so
`chezmoi apply` does not strip it on the next run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adopt uv into the mise config so it stops emitting the "installed but
not activated" warning. uv is also a prerequisite for the pipx backend
falling back to uvx on hosts where pipx is unavailable (TrueNAS, plain
Linux without a pipx install).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Broken Links Detected

Summary

Status Count
🔍 Total 128
✅ Successful 122
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 5
❓ Unknown 0
🚫 Errors 1

Errors per input

Errors in exact_dot_claude/docs/prds/daily-catchup.PRD.md


Please fix the broken links before merging.

@laurigates laurigates merged commit 9663c0c into main May 10, 2026
7 of 8 checks passed
@laurigates laurigates deleted the fix/mise-gate-node-npm-tools-to-darwin branch May 10, 2026 17:23
laurigates added a commit that referenced this pull request May 10, 2026
## Summary

- Rewrite the misleading comment above the Python Tools block. Previous
comment claimed mise's pipx backend "automatically uses uvx if uv is
installed", but mise only detects mise-managed uv — system-PATH uv is
invisible to the auto-detection (see
[jdx/mise#7477](jdx/mise#7477)).
- Add `pipx.uvx = true` under `[settings]` to make the routing explicit
and version-independent.

## Why

PR #199 surfaced this when `mise install pipx:pre-commit` failed on a
host where uv was on `\$PATH` but not mise-managed. The fallback
silently tried `pipx`, which wasn't installed → install failed. After PR
#199 added `uv = "latest"` as a mise-managed tool, the fallback worked —
but the behavior is still implicit and would break again if uv ever
stops being mise-managed.

## Test plan

- [x] `mise settings get pipx.uvx` returns `true` after apply
- [x] `mise install pipx:pre-commit` succeeds without
`MISE_PIPX_UVX=true` env override
- [ ] On macOS: confirm same behavior (no regression)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Lauri Gates <lgates@truenas.intra.lakuz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
laurigates added a commit that referenced this pull request May 11, 2026
## Summary

- Switch the stylua pre-commit hook from `id: stylua` (language: rust,
builds from source via `cargo install`) to `id: stylua-github`
(downloads a prebuilt release binary from the upstream repo).
- Unblocks commits on minimal Linux hosts without a system C linker,
while leaving macOS and standard CI runners unaffected.

## Why

The default upstream hook tries to `cargo install stylua` on first use.
That requires `cc`, which isn't present on minimal Linux hosts where
`apt` is disabled (notably TrueNAS appliances). Result: **every commit
fails on those hosts** — even commits that don't touch any Lua files —
because pre-commit installs hook envs eagerly. Workaround in use until
now was `SKIP=stylua git commit …` per commit (see #199).

The upstream repo ships three variants at `v2.1.0`:

| id | language | works without `cc`? |
|----|----------|---------------------|
| `stylua` | rust | ❌ (current) |
| `stylua-system` | system | ✅, but needs stylua on `$PATH` |
| `stylua-github` | python | ✅, downloads release binary |

`stylua-github` keeps the workflow uniform across machines without
requiring a per-host stylua install, matching the preference in #200.

## Test plan

- [x] On TrueNAS host (no `cc`): `pre-commit clean && pre-commit run
--all-files` → `StyLua (Github) ... Passed`
- [x] Conventional-commit hook passes against the commit message
- [ ] CI smoke (ubuntu-latest) passes on PR

Fixes #200

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Lauri Gates <lgates@truenas.intra.lakuz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant