From a59ccf2e0673002e5dafabe5cf093e6c826354a1 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 9 Apr 2026 15:23:01 +0200 Subject: [PATCH] Hide deprecated chromium from tool listings when not installed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After #14334 deprecated the chromium installer, `quarto list tools` and `quarto check install` still show chromium as "Not installed" even for users who never had it. This is noise — no one should be installing it. Add `isDeprecatedTool()` helper to filter deprecated tools from both `loadTools()` and `allTools()` when not installed. Users with chromium still installed see it (with the deprecation hint) so they can uninstall. The helper and chromium registry entry get removed entirely in v1.11. Also adds a CI assertion in test-install.yml to verify chromium does not appear in `quarto list tools` after the redirect install. --- .github/workflows/test-install.yml | 10 ++++++++++ src/tools/tools-console.ts | 2 ++ src/tools/tools.ts | 9 ++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index 968dc117b2..81ca3f743b 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -120,6 +120,16 @@ jobs: exit 1 fi + - name: Verify quarto list tools does not show chromium + shell: bash + run: | + output=$(quarto list tools 2>&1) + echo "$output" + if echo "$output" | grep -iq "chromium"; then + echo "::error::Deprecated chromium should not appear in 'quarto list tools' when not installed" + exit 1 + fi + - name: Update chromium (should redirect) and capture result id: update-chromium shell: bash diff --git a/src/tools/tools-console.ts b/src/tools/tools-console.ts index 1cf492540d..70e951efd0 100644 --- a/src/tools/tools-console.ts +++ b/src/tools/tools-console.ts @@ -12,6 +12,7 @@ import { installableTool, installableTools, installTool, + isDeprecatedTool, toolSummary, uninstallTool, updateTool, @@ -94,6 +95,7 @@ export async function loadTools(): Promise { for (const key of installableTools()) { const tool = installableTool(key); const installed = await tool.installed(); + if (!installed && isDeprecatedTool(key)) continue; const version = await tool.installedVersion(); const latest = await tool.latestRelease(); toolInfos.push({ key, tool, version, installed, latest }); diff --git a/src/tools/tools.ts b/src/tools/tools.ts index 7a69aadaac..290f376f9d 100644 --- a/src/tools/tools.ts +++ b/src/tools/tools.ts @@ -37,6 +37,13 @@ const kInstallableTools: { [key: string]: InstallableTool } = { verapdf: verapdfInstallable, }; +// Tools deprecated in v1.10, to be removed from the registry in v1.11 +const kDeprecatedTools = new Set(["chromium"]); + +export function isDeprecatedTool(key: string): boolean { + return kDeprecatedTools.has(key); +} + export async function allTools(): Promise<{ installed: InstallableTool[]; notInstalled: InstallableTool[]; @@ -50,7 +57,7 @@ export async function allTools(): Promise<{ const isInstalled = await tool.installed(); if (isInstalled) { installed.push(tool); - } else { + } else if (!isDeprecatedTool(name)) { notInstalled.push(tool); } }