Skip to content

Introduce the concept of a PackageManager for fetching and listing dependencies#265

Open
jackh726 wants to merge 2 commits into
mainfrom
pm-deps
Open

Introduce the concept of a PackageManager for fetching and listing dependencies#265
jackh726 wants to merge 2 commits into
mainfrom
pm-deps

Conversation

@jackh726

Copy link
Copy Markdown
Contributor

Part of the registry-centric plugins RFD.

Disclosure questions

AI disclosure.

  • The AI tool authored large parts of the code

jackh726 added 2 commits July 15, 2026 17:57
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.
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