fix(doctor): list installed plugins from install state#9863
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to disable specific backends through configuration. It adds validation logic in the backend and CLI argument modules to ensure disabled backends are not utilized, returning an error when attempted. The mise doctor command was also updated to include plugin details in its JSON output, supported by a refactor of plugin-related helper functions. A review comment suggests optimizing the is_disabled_backend_type function to reduce string allocations and improve performance by potentially caching disabled backend types.
Greptile SummaryThis PR fixes
Confidence Score: 5/5Safe to merge — the change is narrowly scoped to the doctor output path and does not alter any tool resolution logic. Both code paths call render_plugins()/render_plugins_json() only after Config::get().await completes, guaranteeing install_state::init() has run. The refactor from backend::list() to install_state::list_plugins() is correct for a diagnostic command that should reflect actual on-disk plugin state regardless of which backends are enabled. No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "fix(doctor): isolate installed plugin re..." | Re-trigger Greptile |
Summary
mise doctorfrom install state instead of enabled backend instancesmise doctor -Junder a newpluginsobjectRoot Cause
mise doctorrendered plugins by iteratingbackend::list(). That list respects enabled backends, so plugins installed through a disabled backend could disappear from doctor output even though they were still present in install state. This made it harder to diagnose reports like #6021.This PR is intentionally scoped to doctor output only. The separate
disable_backendsresolution behavior change is split into another PR.Tests
mise run test:e2e e2e/backend/test_disable_backendscargo check --all-featuresmise run lintThis PR description was generated by an AI coding assistant.