turbo
a4a67259 - refactor: Read a registry once into the catalog's own package index (#15130)

Commit
3 days ago
refactor: Read a registry once into the catalog's own package index (#15130) ### Description Part 2 of 8. This stack replaces #15127. The recipe reader's index cannot list its packages, and it does not say which package answered an alias. The catalog read the registry a second time to suggest packages, and a short name that pointed at an alias recorded the alias. - A registry is now one shape: a name, a source of bytes, and recipes that the catalog reads the first time a lookup asks. - The catalog keeps its own package index. A lookup by name records the package ID of the recipe that answered. - A registry error names the registry, and it never prints the registry's text. One result changes. Three bundled short names point at aliases (`buildifier`, `gitversion`, `revive`), and a new lock entry for them records the recipe's own package ID, such as `aqua:revive-lint/revive`. An existing lock entry is still reused, because a declaration without `from` accepts any recorded `aqua` package. ### Testing Instructions A new test asks the new index and the recipe reader's index for every package ID and alias in the bundled registry, and compares the answers. CI runs the Rust tests only for a PR whose base is `main`, so I ran `cargo lint`, the crate tests, and the setup tests on this branch locally. All pass. I built this branch and ran the 25 real-download checks from #15124 on macOS arm64 (jq, ripgrep, protoc, kustomize, and gh resolve, install, and run). All pass.
Author
Parents
Loading