update: resolve tool names through the registry, not executor names - #303
Merged
Merged
Conversation
`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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. Sogg update ghsaid "not found in cache" whilegg update cliworked, and all 14 aliases missed too. The display name came from the same place, sogg updatelisted 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:gitwith 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".