Skip to content

update: resolve tool names through the registry, not executor names - #303

Merged
eirikb merged 1 commit into
mainfrom
feature/eirikb/fix-gg-update-tool-name-resolution
Jul 27, 2026
Merged

update: resolve tool names through the registry, not executor names#303
eirikb merged 1 commit into
mainfrom
feature/eirikb/fix-gg-update-tool-name-resolution

Conversation

@eirikb

@eirikb eirikb commented Jul 27, 2026

Copy link
Copy Markdown
Owner

gg update <tool> matched what you typed against executor.get_name(), which is the GitHub repo for the github-backed tools (gh -> cli, git -> portable-git, antigravity -> antigravity-cli), the invoked alias for ruby and the npm spec name for node. So gg update gh said "not found in cache" while gg update cli worked, and all 14 aliases missed too. The display name came from the same place, so gg update listed the repo names - the only ones that happened to work.

registry_name/canonical_name resolve an executor, or a name the user typed, through the tool registry. checker.rs and main.rs share them.

Same root cause in the dependency dedupe: gh declares an optional dep on git, but a built git executor calls itself portable-git, so the dep looked unsatisfied and a second executor was built over the same cache dir and prepped alongside the first. gg gh:git with git off PATH downloaded portable-git twice, now once.

Exit codes while in here, since nothing could tell them apart before: everything printed to stdout and exited 0. Not installed yet stays 0 - callers update before they install - and only a name that is not a tool exits 1. An @Version that will not parse is an error too, rather than quietly checking every cached version; the gg.toml pin no longer depends on HashMap order; and a failed prep, after the cache dir is already deleted, stops claiming "Successfully updated".

`gg update <tool>` matched what you typed against executor.get_name(),
which is the GitHub repo for the github-backed tools (gh -> cli, git ->
portable-git, antigravity -> antigravity-cli), the invoked alias for ruby
and the npm spec name for node. So `gg update gh` said "not found in
cache" while `gg update cli` worked, and all 14 aliases missed too. The
display name came from the same place, so `gg update` listed the repo
names - the only ones that happened to work.

registry_name/canonical_name resolve an executor, or a name the user
typed, through the tool registry. checker.rs and main.rs share them.

Same root cause in the dependency dedupe: gh declares an optional dep on
git, but a built git executor calls itself portable-git, so the dep looked
unsatisfied and a second executor was built over the same cache dir and
prepped alongside the first. `gg gh:git` with git off PATH downloaded
portable-git twice, now once.

Exit codes while in here, since nothing could tell them apart before:
everything printed to stdout and exited 0. Not installed yet stays 0 -
callers update before they install - and only a name that is not a tool
exits 1. An @Version that will not parse is an error too, rather than
quietly checking every cached version; the gg.toml pin no longer depends
on HashMap order; and a failed prep, after the cache dir is already
deleted, stops claiming "Successfully updated".
@eirikb
eirikb enabled auto-merge (squash) July 27, 2026 13:03
@eirikb
eirikb merged commit 80d6393 into main Jul 27, 2026
338 of 354 checks passed
@eirikb
eirikb deleted the feature/eirikb/fix-gg-update-tool-name-resolution branch July 27, 2026 15:42
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