Skip to content

fix: better help for user without mise installs#40

Open
janderssonse wants to merge 6 commits intomainfrom
fix/mise-source-of-truth
Open

fix: better help for user without mise installs#40
janderssonse wants to merge 6 commits intomainfrom
fix/mise-source-of-truth

Conversation

@janderssonse
Copy link
Copy Markdown
Contributor

@janderssonse janderssonse commented Apr 14, 2026

Pull Request Description

The bug this started from

devbase-check runs linters via command -v . That trusts whatever's on PATH. The trap: if .mise.toml pins something
like pipx:reuse but pipx isn't installed on the host, mise install silently skips that pin. The linter then either finds a
stale system copy of reuse (wrong version, different behaviour) or fails with an opaque "not found". Nothing tells the user
the real cause is a half-done mise install.

So the theme of this branch is: mise is the source of truth for tool versions, and if mise says a pin is missing, we say so
— loudly, once, and with a clear way out.

What a user sees now

Running just lint-all with any pinned tool missing prints one message:

✗ mise install is incomplete — run: mise install
- pipx:reuse
(to skip: --ignore-missing-linters or DEVBASE_CHECK_IGNORE_MISSING_LINTERS=1)

Not once per linter — once, from a preflight at the top of verify.sh. Each linter still has its own guard, but when it fires
for a tool that isn't its own (e.g. running ./linters/license.sh while aqua:mvdan/sh is missing), it stays quiet — reuse
isn't broken, no point complaining.

If the user passes --ignore-missing-linters (or sets DEVBASE_CHECK_IGNORE_MISSING_LINTERS=1), the preflight warns and
proceeds; affected linters emit a skip marker so the summary table shows them as - with mise pin missing, instead of wrongly
passing because a stray binary was on PATH. For locked-down environments where mise install genuinely can't complete,
DEVBASE_CHECK_ALLOW_SYSTEM_TOOLS=1 disables the whole check.

Example illustrating how different features of this works in different scenarios:
Skärmbild 2026-04-21 095526

Checklist

  • Changes are limited to a single goal (avoid scope creep)
  • I confirm that I have read any Contribution and Development guidelines (CONTRIBUTING and DEVELOPMENT) and are following their suggestions.
  • I confirm that I wrote and/or have the right to submit the contents of my Pull Request, by agreeing to the Developer Certificate of Origin, (adding a 'sign-off' to my commits).

@janderssonse janderssonse force-pushed the fix/mise-source-of-truth branch 6 times, most recently from 815d46d to 277586e Compare April 14, 2026 22:55
@janderssonse janderssonse changed the title fix: mise source of truth fix: various issues Apr 14, 2026
@janderssonse janderssonse changed the title fix: various issues fix: better help for user without mise installs Apr 14, 2026
@janderssonse janderssonse force-pushed the fix/mise-source-of-truth branch 2 times, most recently from 2c3ba06 to 2632fb1 Compare April 21, 2026 07:35
Signed-off-by: Josef Andersson <josef.andersson@digg.se>
Move rumdl off the obsolete ubi backend.

Signed-off-by: Josef Andersson <josef.andersson@digg.se>
Introduce utils/mise-tool.sh shared helpers and a
fail_if_mise_install_incomplete guard sourced by every linter. Linters
now fail with "run: mise install" when any pinned tool is missing,
instead of falling through to a stray system copy on PATH.
check-tools.sh labels each resolved tool as (mise) or (system).

Escape hatch: DEVBASE_CHECK_ALLOW_SYSTEM_TOOLS=1.

Signed-off-by: Josef Andersson <josef.andersson@digg.se>
Single preflight fails fast with one message listing missing pins,
instead of cascading the same error through every linter. New
--ignore-missing-linters flag (and DEVBASE_CHECK_IGNORE_MISSING_LINTERS
env var) opt into running with a partial install. Unknown flags exit 2.

Signed-off-by: Josef Andersson <josef.andersson@digg.se>
Per-linter guard now accepts tool-identifier args and only fires when
one matches a missing pin — running ./linters/license.sh no longer
errors because aqua:mvdan/sh is missing, only if pipx:reuse is.

Each mise-pinned linter passes its tool. The node/* linters (no mise
pin) drop the guard entirely.

Signed-off-by: Josef Andersson <josef.andersson@digg.se>
@janderssonse janderssonse force-pushed the fix/mise-source-of-truth branch from 2632fb1 to b845283 Compare April 21, 2026 07:36
Signed-off-by: Josef Andersson <josef.andersson@digg.se>
@janderssonse janderssonse requested a review from asserh April 21, 2026 07:45
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