feat(pm): implement catalog protocol for dependency resolution#2678
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant enhancement to dependency management by adding a 'catalog' protocol. This feature enables developers to centralize and share dependency version specifications across projects or within a monorepo, promoting consistency and simplifying updates. By resolving these catalog entries during the dependency processing phase and ensuring lock file freshness checks are catalog-aware, the system gains improved reliability and maintainability for managing shared dependencies. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for the catalog: dependency protocol, allowing shared version specifications to be defined in .utoo.toml and referenced in package.json. The changes involve refactoring the PackageSpec and Protocol definitions into a new spec module, updating configuration handling to load and cache catalog definitions, and modifying the dependency resolution builder to correctly process catalog: specs. Comprehensive end-to-end tests have been added to validate the new functionality, including basic installation and catalog update flows. The implementation appears robust and well-tested, enhancing the package manager's flexibility for managing dependencies.
d25bfa3 to
217dd16
Compare
Add support for the `catalog:` dependency protocol, which allows
defining shared version specs in `.utoo.toml` and referencing them
from package.json via `catalog:` or `catalog:<name>`.
Key changes:
- Parse `catalog:` as `PackageSpec::Local { protocol: Catalog }` in spec parser
- Resolve catalog specs inline in `process_dependency` (same pattern as workspace/git)
- Add `Catalogs` type and `resolve_catalog_spec` to ruborist spec module
- Normalize default catalog keys ("" / "default") at config build time
- Add catalog-aware lock freshness check in `deps_match` closure
- Add `catalogs` field to `BuildDepsConfig` and `BuildDepsOptions`
- Add e2e test fixture and test cases for catalog resolution
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
217dd16 to
7ae96bb
Compare
Summary
catalog:dependency protocol support — define shared version specs in.utoo.toml, reference viacatalog:orcatalog:<name>inpackage.jsonprocess_dependency(same pattern asworkspace:/git:)""/"default") at config build timeTest plan
cargo test -p utoo-pm -p utoo-ruborist— all passcargo clippy— no warnings./e2e/utoo-pm.sh— catalog e2e tests🤖 Generated with Claude Code