Conversation
The in-process seam from the registry-centric plugin distribution RFD, cut to the smallest slice that is a pure refactor: a PackageId names a package as (pm, name, version), the PackageManager trait has a single fetch operation, and CargoPm implements it by delegating to the existing RustCrateFetch. The two direct fetch sites — crate-source skill resolution and crate-info — now build a cargo id and fetch through the seam. No behavior change: an id's version is the same optional requirement string RustCrateFetch::version took, and the fetched id carries back exactly the name/version/path FetchResult did. Everything else the RFD gives the PM layer (list_deps, list_plugins, search, more PMs, the registry tier) is deliberately left for later steps so each can be reviewed on its own.
The second and last behavior-preserving step: with fetch already behind the PackageManager seam, list_deps moves the workspace dependency list behind it too, and PredicateContext now holds PackageIds instead of (String, semver::Version) pairs. Cargo is still the only dependency source, so an id is an isomorphic re-representation of the pair — same name, same version rendered as a string that parses back losslessly — and the predicate matching logic is unchanged: a depends-on atom matches by exact name, and a version requirement is checked when the id's version component parses as semver (today: always). The predicate test suite is untouched except for the representation in its fixtures. Witnesses (the source = "crate" fetch set) and custom-predicate selectedCrate records become PackageIds as well; the crate-skill worklist keeps seeding from the witness name only, exactly as before. Each of the seven former crate_pairs sites calls CargoPm.list_deps directly — no registry/union tier, since there is only one PM. crate_pairs itself is deleted.
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.
Part of the registry-centric plugins RFD.
Disclosure questions
AI disclosure.